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); }
public AISlimeAction(Slime actionSlime, SlimeAction action) : base(action.GetAction(), action.GetData()) { this.actionSlime = actionSlime; }
public bool IsEqual(SlimeAction other) { return(this.action == other.GetAction() && this.data == other.GetData()); }