public void PatrolGo(GameObject Patrol) { //Debug.Log("11"); int w = Random.Range(0, 4); PatrolAction ac = PatrolAction.GetPatrolAction(w, Patrol.transform.position); RunAction(Patrol, ac, this); }
public static PatrolAction GetPatrolAction(int way, Vector3 o) { PatrolAction action = ScriptableObject.CreateInstance <PatrolAction>(); action.OriPos = o; action.WalkWay = way; action.SetTarget(way); return(action); }
//private GameObject d; public void SSActionEvent(SSAction source, SSActionEventType events = SSActionEventType.Competeted, int intParam = 0, string strParam = null, Object objectParam = null) { PatrolAction p = source as PatrolAction; p.PatrolData.Hit = false; PatrolAction ac = PatrolAction.GetPatrolAction((p.WalkWay + 1) % 4, p.OriPos); RunAction(p.gameobject, ac, this); }