Class: Pathfinding::Cursor

Inherits:
Object show all
Includes:
GameData::SystemTags
Defined in:
docs/4_Systems_003_Map_Engine.rb

Overview


Class that describe and manipulate the simili character used in pathfinding

Constant Summary collapse

SurfTag =

SystemTags that trigger Surfing

Game_Character::SurfTag
SurfLTag =

SystemTags that does not trigger leaving water

Game_Character::SurfLTag
SlideTags =

SystemTags that triggers “sliding” state

[TIce, RapidsL, RapidsR, RapidsU, RapidsD, RocketL, RocketU, RocketD, RocketR, RocketRL, RocketRU, RocketRD, RocketRR]
BRIDGE_TILES =

Array used to detect if a character is on a bridge tile

[BridgeRL, BridgeUD]

Constants included from GameData::SystemTags

GameData::SystemTags::AcroBike, GameData::SystemTags::AcroBikeRL, GameData::SystemTags::AcroBikeUD, GameData::SystemTags::BridgeRL, GameData::SystemTags::BridgeUD, GameData::SystemTags::CrackedSoil, GameData::SystemTags::DeepSwamp, GameData::SystemTags::Empty, GameData::SystemTags::HeadButt, GameData::SystemTags::Hole, GameData::SystemTags::JumpD, GameData::SystemTags::JumpL, GameData::SystemTags::JumpR, GameData::SystemTags::JumpU, GameData::SystemTags::MachBike, GameData::SystemTags::Puddle, GameData::SystemTags::RClimb, GameData::SystemTags::RapidsD, GameData::SystemTags::RapidsL, GameData::SystemTags::RapidsR, GameData::SystemTags::RapidsU, GameData::SystemTags::Road, GameData::SystemTags::RocketD, GameData::SystemTags::RocketL, GameData::SystemTags::RocketR, GameData::SystemTags::RocketRD, GameData::SystemTags::RocketRL, GameData::SystemTags::RocketRR, GameData::SystemTags::RocketRU, GameData::SystemTags::RocketU, GameData::SystemTags::SlopesL, GameData::SystemTags::SlopesR, GameData::SystemTags::StairsD, GameData::SystemTags::StairsL, GameData::SystemTags::StairsR, GameData::SystemTags::StairsU, GameData::SystemTags::StopSlide, GameData::SystemTags::SwampBorder, GameData::SystemTags::TCave, GameData::SystemTags::TGrass, GameData::SystemTags::TIce, GameData::SystemTags::TMount, GameData::SystemTags::TPond, GameData::SystemTags::TSand, GameData::SystemTags::TSea, GameData::SystemTags::TSnow, GameData::SystemTags::TTallGrass, GameData::SystemTags::TUnderWater, GameData::SystemTags::TWetSand, GameData::SystemTags::WaterFall, GameData::SystemTags::Whirlpool, GameData::SystemTags::ZTag

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GameData::SystemTags

gen, system_tag_db_symbol

Constructor Details

#initialize(character) ⇒ Cursor

Returns a new instance of Cursor.



3664
3665
# File 'docs/4_Systems_003_Map_Engine.rb', line 3664

def initialize(character)
end

Instance Attribute Details

#__bridge (readonly)

Returns the value of attribute __bridge.



3663
3664
3665
# File 'docs/4_Systems_003_Map_Engine.rb', line 3663

def __bridge
  @__bridge
end

#x (readonly)

Returns the value of attribute x.



3660
3661
3662
# File 'docs/4_Systems_003_Map_Engine.rb', line 3660

def x
  @x
end

#y (readonly)

Returns the value of attribute y.



3661
3662
3663
# File 'docs/4_Systems_003_Map_Engine.rb', line 3661

def y
  @y
end

#z (readonly)

Returns the value of attribute z.



3662
3663
3664
# File 'docs/4_Systems_003_Map_Engine.rb', line 3662

def z
  @z
end

Instance Method Details

#sim_move?(sx, sy, sz, code, b = @__bridge, slide = @sliding, surf = @surfing) ⇒ Boolean

Simulate the mouvement of the character and store the data into cursor’s attributes

Parameters:

  • sx (Integer)

    start coords X

  • sy (Integer)

    start coords Y

  • sz (Integer)

    start coords z

  • code (Integer)

    mouvement’s code

  • b (Array, nil) (defaults to: @__bridge)

    bridge metadata

  • slide (Boolean) (defaults to: @sliding)

    slide meta data

  • surf (Boolean) (defaults to: @surfing)

    surf meta data

Returns:

  • (Boolean)


3678
3679
# File 'docs/4_Systems_003_Map_Engine.rb', line 3678

def sim_move?(sx, sy, sz, code, b = @__bridge, slide = @sliding, surf = @surfing)
end

#state

Get the current state of the cursor



3667
3668
# File 'docs/4_Systems_003_Map_Engine.rb', line 3667

def state
end