示例#1
0
    public void changeBehaviour(CoachCmd cmd)
    {
        //if (IdTest.instance != null)
        //{
        //    if (actor.id == IdTest.instance.id)
        //    {
        //        UnityEngine.Debug.LogError("changeBehaviour old " + curCmd + "  cur  " + cmd);
        //    }
        //}
        if (cmd == curCmd)
        {
            return;
        }

        curCmd = cmd;

        stopDefense();

        if (cmd == CoachCmd.Idle)
        {
            stop();
            behaviour.SetActive(false);
        }
        else
        {
            setBehaviour(cmd.ToString());
            behaviour.SetActive(true);
        }
    }
示例#2
0
 public void setPlayerBehaviour(CoachCmd cmd)
 {
     if (gk == null)
     {
         return;
     }
     //if (IdTest.instance != null)
     //{
     //    if (IdTest.instance.team == team)
     //    {
     //        UnityEngine.Debug.LogError("setPlayerBehaviour " + cmd);
     //    }
     //}
     gk.changeBehaviour(cmd);
 }