コード例 #1
0
    public void patrolling(GameObject patrol)
    {
        Vector3      patrollCenter = new Vector3(patrol.GetComponent <PatrolData>().rangeX + 10, 0, patrol.GetComponent <PatrolData>().rangeZ + 10);
        PatrolAction action        = PatrolAction.getSSAction(patrollCenter);

        this.RunAction(patrol, action, this);
    }
コード例 #2
0
 public void SSActoinEvent(SSAction source, int param = 0, GameObject objParam = null)
 {
     if (param == 0)
     {
         FollowAction followAction = FollowAction.getSSAction(objParam.gameObject.GetComponent <PatrolData>().player);
         this.RunAction(objParam, followAction, this);
     }
     else
     {
         PatrolAction patrolAction = PatrolAction.getSSAction(objParam.gameObject.GetComponent <PatrolData>().start_position);
         this.RunAction(objParam, patrolAction, this);
         Singleton <GameEventManager> .Instance.playerEscape();
     }
 }
コード例 #3
0
 public void SSActionEvent(SSAction source,
                           int intParam,
                           GameObject objectParam)
 {
     if (intParam == 0)
     {
         PatrolFollowAction follow = PatrolFollowAction.getSSAction(objectParam);
         this.RunAction(objectParam, follow, this);
     }
     else
     {
         PatrolAction move = PatrolAction.getSSAction(objectParam.transform.position);
         this.RunAction(objectParam, move, this);
     }
 }
コード例 #4
0
 public void GoPatrol(GameObject patrol)
 {
     patrolAction = PatrolAction.getSSAction(patrol.transform.position);
     this.RunAction(patrol, patrolAction, this);
 }