Inheritance: MonoBehaviour
Esempio n. 1
0
    void OnCollisionEnter(Collision other)
    {
        if (other.gameObject.tag == ("fastBullet") || other.gameObject.tag == ("slowBullet")) {
            bulletScript = other.gameObject.GetComponent <Destroy_Bullet> ();
            timerMultiplier = bulletScript.chargeLevel / 2f;
        }
        if (other.gameObject.tag == ("slowBullet")){
            if(isSpeeding){
                StopCoroutine (DelayFast());
                isSpeeding = false;
            }
            if(Sister == true){
                    BlocksAnim.speed = 0.025f;
                    SisterAnim.speed = 0.025f;
                }else{
                    BlocksAnim.speed = 0.025f;
                }

            StartCoroutine (DelaySlow());
        }
        if (other.gameObject.tag == ("fastBullet")){
            if(isSlowing){
                StopCoroutine (DelaySlow());
                isSlowing = false;
            }
            if(Sister == true){
                    BlocksAnim.speed = 2.0f;
                    SisterAnim.speed = 2.0f;
                }else{
                    BlocksAnim.speed = 2.0f;
                }
            StartCoroutine (DelayFast());
        }
    }
Esempio n. 2
0
    // Use this for initialization
    private void Awake()
    {
        if (instance != null)
        {
            Debug.Log("fuck_V3");
        }
        else
        {
            instance = this;
        }

        Destroy(bullet, 2);
    }