예제 #1
0
 // Use this for initialization
 public void Awake()
 {
     model      = transform.Find("model");
     armCtrl    = model.Find("armCtrl");
     bodyRb     = GetComponent <Rigidbody>();
     cageScript = GameObject.Find("Cage").GetComponent <cageCtrl>();
     cageScript.Register(volume);
     nextMoveTime     = Time.time + Random.Range(minMoveInterval, maxMoveInterval);
     bloodParticlePos = transform.Find("bloodParticlePos");
     audio            = GetComponents <AudioSource>();
 }
예제 #2
0
 void Reach()
 {
     screenShake.shakecoefficient = 0.5f;
     screenShake.StopScreen(0.05f);
     reachTarget = true;
     landingParticle.Play();
     Smash();
     cageScript.Register(volume * transform.localScale.x);
     //Debug.Log("pushing");
     audioS.Play();
     if (loaded)
     {
         cageScript.SetUpTarget(transform);
         StartCoroutine("startTalking", Random.Range(2.5f, 3f));
     }
     GameObject.Find("MouseCtrl").GetComponent <mouseCtrl>().RestartAimming();
 }