Ejemplo n.º 1
0
 public void Init(TreeTileMapObject owner)
 {
     treeTileMapObject = owner;
     SetGlobalPosition(owner.GetGlobalPosition());
 }
Ejemplo n.º 2
0
 private void KillTreeSelected(InputEvent inputEvent)
 {
     if (inputEvent.IsActionPressed(GameConstants.ControlsActionClick) && player.CanRemoveTree(treeTileMapObject.GetGlobalPosition()))
     {
         treeTileMapObject.Kill();
         Visible = false;
         AcceptEvent();
     }
 }
Ejemplo n.º 3
0
 public void HealTree(TreeTileMapObject tree)
 {
     playerStateMachine.TransitionTo(playerStateMachine.healTree, new MoveToPositionMessage(pathfindingTileMap.WorldToMap(tree.GetGlobalPosition())));
 }