void Awake()
    {
        nextDamageRatio = 0.0f;
        damageSpeed     = 0.1f;

        officer          = GameObject.FindGameObjectWithTag("Player");
        healthController = officer.GetComponent <playerHealthController> ();
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        nextDamageRatio = 0f;


        officer          = GameObject.FindGameObjectWithTag("Player");
        healthController = officer.GetComponent <playerHealthController>();
    }
 void Update()
 {
     explosionAS.PlayOneShot(explosionSound);
     transform.localScale = new Vector3(Mathf.PingPong(Time.time * 10, 6), 1f, 1f);
     officer          = GameObject.FindGameObjectWithTag("Player");
     healthController = officer.GetComponent <playerHealthController> ();
     timer           += Time.deltaTime;
     if (timer > 1)
     {
         Destroy(gameObject);
     }
 }
    void Awake()
    {
        officerRB         = GetComponent <Rigidbody> ();
        officerAnimation  = GetComponent <Animator> ();
        characterAudio    = GetComponent <CharacterAudioController> ();
        health            = GetComponent <playerHealthController> ();
        facingRight       = true;
        isGrounded        = false;
        groundCheckRadius = 0.2f;
        jumpCount         = 0; // initalize the jump round to 0

        teleportDoubleJump = true;


        teleportTrigger = false;
    }