Exemplo n.º 1
0
 /// <summary>
 /// 发动卡片
 /// </summary>
 /// <param name="target"></param>
 private void DoCasted(ActorMono target)
 {
     //holder.GetComponent<ActorMono>().StartCoroutine(holder.GetComponent<ActorMono>().CastCard(card, target));
     holder.GetComponent <ActorMono>().CastCard(card, target);
     state = State.none;
     OnNone();
 }
Exemplo n.º 2
0
    private void OnTurnStart()
    {
        BattleState = State.TurnStart;

        Camera.main.GetComponent <CameraController>().MoveToTarget(actor_curTurn.gameObject);

        // buff清零
        actor_curTurn.atk_addValue = 0;

        if (actor_curTurn.group == ActorMono.Group.monster)
        {
            actor_curTurn.ResumeMovePoint();
            actor_curTurn.DiscardFocusedCard();
            actor_curTurn.GetComponent <MonsterController>().TurnStart();
        }
        else
        {
            actor_curTurn.DiscardFocusedCard();
            actor_curTurn.FocusUp();
            actor_curTurn.DrawStartCard();
            actor_curTurn.ResumeActionPoint();
            actor_curTurn.ResumeMovePoint();
        }

        bool isPlayerTurn = (actor_curTurn.group == ActorMono.Group.player);

        UIManager.instance.ActiveUI("ActionPoint", isPlayerTurn);
        UIManager.instance.ActiveUI("MovePoint", isPlayerTurn);
        UIManager.instance.ActiveUI("UIArea", isPlayerTurn);
        UIManager.instance.ActiveUI("Hand", isPlayerTurn);
        UIManager.instance.ActiveUI("DeckNum", isPlayerTurn);
        UIManager.instance.ActiveUI("DiscardNum", isPlayerTurn);
        UIManager.instance.ActiveUI("FocusPoint", isPlayerTurn);
        UIManager.instance.ActiveUI("TurnEnd", isPlayerTurn);
        UIManager.instance.ActiveUI("Resources", isPlayerTurn);
    }