Exemplo n.º 1
0
    public void DoAction(SlimeAction action)
    {
        if (action == null)
        {
            return;
        }
        switch (action.GetAction())
        {
        case ActionType.ATTACK:
            AttackSlime(action.GetSlime());
            break;

        case ActionType.CONQUER:
            //Debug.Log("CONQUER");
            ConquerTile(action.GetTile());
            break;

        case ActionType.SPLIT:
            //Debug.Log("SPLIT");
            SplitSlime(action.GetTile());
            break;

        case ActionType.EAT:
            GrowSlime(action.GetSlime());
            break;

        case ActionType.MOVE:
            MoveSlime(action.GetTile());
            break;

        case ActionType.FUSION:
            //Debug.Log("FUSION");
            FusionSlime(action.GetSlime());
            break;
        }
        SetSelectedSlime(null);
        uiController.UpdateActions(playerActions, GetCurrentPlayer().actions);
    }
Exemplo n.º 2
0
 public AISlimeAction(Slime actionSlime, SlimeAction action) : base(action.GetAction(), action.GetData())
 {
     this.actionSlime = actionSlime;
 }
Exemplo n.º 3
0
 public bool IsEqual(SlimeAction other)
 {
     return(this.action == other.GetAction() && this.data == other.GetData());
 }