コード例 #1
0
    // Use this for initialization
    void Start()
    {
        shieldBall  = shieldBallPrefab.GetComponent <BigOssiBallBehaviour> ();
        VelocityX   = Velocity.x;
        VelocityY   = Velocity.y;
        endPosition = new Vector3(gameObject.transform.position.x, -10f);

        Instantiate(explosionPrefab, gameObject.transform.position, Quaternion.Euler(Vector3.zero));

        if (audio)
        {
            audio.volume = Statics.soundVolume;

            audio.clip  = sounds [0];
            audio.pitch = Random.Range(0.9f, 1.2f);
            audio.Play();
        }
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {       //Get the animator
        anim       = GetComponent <Animator> ();
        darkMatter = GetComponentInChildren <ParticleSystem> ();

        shieldBall = shieldBallPrefab.GetComponent <BigOssiBallBehaviour> ();
        //calculation for spawning for first time
        bossPhaseSetter();
        //calculateCircumference ();

        if (audio)
        {
            audio.volume = Statics.soundVolume;

            audio.clip  = sounds [2];
            audio.pitch = Random.Range(0.9f, 1.2f);
            audio.Play();
        }
    }