Exemplo n.º 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
     {
         GoPatrolAction move = GoPatrolAction.GetSSAction(objectParam.gameObject.GetComponent <PatrolData>().start_position);
         this.RunAction(objectParam, move, this);
         Singleton <GameEventManager> .Instance.PlayerEscape();
     }
 }
Exemplo n.º 2
0
 //针对这次游戏新增的一个方法,用于增加不同的动作
 public void SSActionEvent(SSAction source, bool catching = false, GameObject objectParam = null)
 {
     //不捉玩家时,自由移动
     if (!catching)
     {
         GoPatrolAction goPatrolAction = GoPatrolAction.GetSSAction(objectParam.gameObject.GetComponent <PatrolData>().start_position);
         RunAction(objectParam, goPatrolAction, this);
         Singleton <GameEventManager> .Instance.PlayerEscape();
     }
     //捕捉玩家时,跟着玩家走
     else
     {
         PatrolFollowAction patrolFollowAction = PatrolFollowAction.GetSSAction(objectParam.gameObject.GetComponent <PatrolData>().player);
         RunAction(objectParam, patrolFollowAction, this);
     }
 }
Exemplo n.º 3
0
 public void SSActionEvent(SSAction source, int intParam = 0, GameObject objectParam = null)
 {
     if (intParam == 0)
     {
         //侦查兵跟随玩家
         Debug.Log("follow");
         PatrolFollowAction follow = PatrolFollowAction.GetSSAction(objectParam.gameObject.GetComponent <PatrolData>().player);
         this.RunAction(objectParam, follow, this);
     }
     else
     {
         //侦察兵按照初始位置开始继续巡逻
         GoPatrolAction move = GoPatrolAction.GetSSAction(objectParam.gameObject.GetComponent <PatrolData>().start_position);
         this.RunAction(objectParam, move, this);
         //玩家逃脱
         Singleton <GameEventManager> .Instance.PlayerEscape();
     }
 }
Exemplo n.º 4
0
 public void GoPatrol(GameObject patrol)
 {
     go_patrol = GoPatrolAction.GetSSAction(patrol.transform.position);
     this.RunAction(patrol, go_patrol, this);
 }