public static GuardFollowAction GetSSAction(GameObject player)
    {
        GuardFollowAction action = CreateInstance <GuardFollowAction>();

        action.player = player;
        return(action);
    }
Beispiel #2
0
 public void SSActionEvent(
     SSAction source, SSActionEventType events = SSActionEventType.Competeted,
     int intParam = 0, GameObject objectParam = null)
 {
     if (intParam == 0)
     {
         //追逐
         GuardFollowAction follow = GuardFollowAction.GetSSAction(player);
         this.RunAction(objectParam, follow, this);
     }
     else
     {
         //巡逻
         GuardPatrolAction move = GuardPatrolAction.GetSSAction(objectParam.gameObject.GetComponent <GuardData>().start_position);
         this.RunAction(objectParam, move, this);
         Singleton <GameEventManager> .Instance.PlayerEscape();
     }
 }