示例#1
0
文件: EyeRok.cs 项目: lindacnatt/MDJ
    // Update is called once per frame
    void Update()
    {
        EyeRokState state = currentState.Update(this);

        if (state != null)
        {
            currentState = state;

            currentState.OnEnter(this);
        }
    }
示例#2
0
文件: EyeRok.cs 项目: lindacnatt/MDJ
    // Start is called before the first frame update
    void Start()
    {
        Player = GameObject.FindGameObjectWithTag("Player");
        navAgent.updateRotation = false;
        navAgent.updateUpAxis   = false;

        LeftHandCollider  = LeftHand.GetComponent <BoxCollider2D>();
        RightHandCollider = RightHand.GetComponent <BoxCollider2D>();

        currentState = new EyeRokPatrol();
        currentState.OnEnter(this);
    }
示例#3
0
文件: Wind.cs 项目: lindacnatt/MDJ
 public override void SetDestination(Vector2 target)
 {
     base.SetDestination(target);
     StartCoroutine(EyeRokState.WaitForSeconds(3.0f, () => Destroy(gameObject)));
 }