Beispiel #1
0
    void GetAttack()
    {
        if (ZoneMarced.Count == 0)
        {
            ZoneMarced = CurrentUnit.Weapon.FireableZone();

            foreach (var item in ZoneMarced)
            {
                item.SetColor(Color.red);
                if (item.Unit != null)
                {
                    item.SetColor(Color.yellow);
                }
                ColoredMarcer.Add(item);
            }
        }

        var node = Node.GetNode;

        if (ZoneMarced.Contains(node) && node.Unit != null)
        {
            CurrentUnit.ShootToNode(node);
            TurnMode = EnumTurnMode._noneMode;
        }
    }
Beispiel #2
0
    private void GetMoving()
    {
        if (ZoneMarced.Count == 0 && !CurrentUnit.FlagConrolled)
        {
            ZoneMarced = CurrentUnit.WalkableZone();
            foreach (var item in ZoneMarced)
            {
                if (item.Unit != null)
                {
                    continue;
                }
                item.SetColor(Color.green);
                ColoredMarcer.Add(item);
            }
        }

        var node = Node.GetNode;

        if (ZoneMarced.Contains(node) && node.Unit == null)
        {
            CurrentUnit.MoveToNode(node);
        }
    }