Class: Pathfinding::Target::Coords

Inherits:
Object
  • Object
show all
Defined in:
docs/4_Systems_003_Map_Engine.rb

Overview

Coords target type

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Coords

Returns a new instance of Coords.



3949
3950
# File 'docs/4_Systems_003_Map_Engine.rb', line 3949

def initialize(*args)
end

Class Method Details

.load(data)

Create new target from the given data

Parameters:

  • data (Array) —

    saved data



3970
3971
# File 'docs/4_Systems_003_Map_Engine.rb', line 3970

def self.load(data)
end

Instance Method Details

#check_move(x, y) ⇒ Boolean

Check if the character targetted has moved, considering the distance for optimisation and return true if the target is considered as moved

Parameters:

  • x (Integer) —

    the x coordinate of the heading event

  • y (Integer) —

    the y coordinate of the heading event

Returns:

  • (Boolean)


3962
3963
# File 'docs/4_Systems_003_Map_Engine.rb', line 3962

def check_move(x, y)
end

#reached?(x, y, z) ⇒ Boolean

Test if the target is reached at the fiveng coords

Parameters:

  • x (Integer) —

    the x coordinate to test

  • y (Integer) —

    the y coordinate to test

  • z (Integer) —

    the x coordinate to test

Returns:

  • (Boolean)


3956
3957
# File 'docs/4_Systems_003_Map_Engine.rb', line 3956

def reached?(x, y, z)
end

#save ⇒ Array<Object>

Gather the savable data

Returns:



3966
3967
# File 'docs/4_Systems_003_Map_Engine.rb', line 3966

def save
end