Exemple #1
0
 //根据传入参数来选择执行不同的动作
 public void SSActionEvent(SSAction source, int intParam = 0, GameObject objectParam = null)
 {
     if (intParam == 0)
     {
         //侦查兵跟随玩家
         PatrolFollowAction follow = PatrolFollowAction.GetSSAction(objectParam.gameObject.GetComponent <PatrolData>().player);
         this.RunAction(objectParam, follow, this);
     }
     else
     {
         //侦察兵按照初始位置开始继续巡逻
         PatrolMoveAction move = PatrolMoveAction.GetSSAction(objectParam.gameObject.GetComponent <PatrolData>().start_position);
         this.RunAction(objectParam, move, this);
         //玩家逃脱
         Singleton <GameEventManager> .Instance.AddScore();
     }
 }
Exemple #2
0
 public void SSActionEvent(SSAction source,
                           SSActionEventType events = SSActionEventType.Compeleted,
                           int intParam             = 0,
                           string strParam          = null,
                           GameObject objectParam   = null)
 {
     //回调函数,动作执行完后调用
     if (intParam == 0)
     {
         //开始跟随玩家
         PatrolFollowAction follow = PatrolFollowAction.GetSSAction(sceneController.player);
         this.RunAction(objectParam, follow, this);
     }
     else
     {
         //丢失目标,继续巡逻
         PatrolMoveAction move = PatrolMoveAction.GetSSAction(objectParam.gameObject.GetComponent <PatrolData>().initPosition);
         this.RunAction(objectParam, move, this);
         //玩家逃脱
         Singleton <GameEventManager> .Instance.PlayerEscape();
     }
 }
Exemple #3
0
 public void PatrolMove(GameObject patrol)
 {
     move = PatrolMoveAction.GetSSAction(patrol.transform.position);
     this.RunAction(patrol, move, this);
 }