Exemplo n.º 1
0
        private void ApproachTargetFlame()
        {
            if (targetFlame != null)
            {
                TDTile currentTile = map.GetTileForWorldPosition(transform.position);
                TDTile flameTile   = map.GetTileForWorldPosition(targetFlame.transform.position);

                if (currentTile.IsOtherAdjacent(flameTile))
                {
                    destination = currentTile.FindPointAdjacentToTileWithBuffer(flameTile, FIRE_BUFFER, transform.position);
                }
                else
                {
                    EGDispatcher.Instance.SendTruckToTile(this, flameTile.GetX(), flameTile.GetY());
                }
            }
        }