Ejemplo n.º 1
0
 void OnChaseTriggerEnter(Collider other)
 {
     if (other.tag == "Hook")
     {
         TargetLine = other.GetComponent <ZB_VerletLine>();
         CurrState  = FishState.Chasing;
     }
 }
Ejemplo n.º 2
0
    private void SetState(FishState state)
    {
        switch (state)
        {
        case FishState.NavAgent:
            //ZB_SceneSingletons.debugText2.text = "Switching to NavAgent state";
            navAgent.enabled  = true;
            rBody.isKinematic = true;
            TargetLine        = null;
            break;

        case FishState.Chasing:
            //ZB_SceneSingletons.debugText2.text = "Switching to Chasing state";
            navAgent.enabled  = false;
            rBody.isKinematic = true;
            break;

        case FishState.Hooked:
            // ZB_SceneSingletons.debugText2.text = "Switching to Hooked state";
            navAgent.enabled  = false;
            rBody.isKinematic = false;
            break;
        }
    }
Ejemplo n.º 3
0
 public VerletLineInputEvents(ZB_VerletLine verletLine)
 {
     this.verletLine = verletLine;
 }
Ejemplo n.º 4
0
 void OnChaseTriggerExit(Collider other)
 {
     CurrState  = FishState.NavAgent;
     TargetLine = null;
 }