Exemple #1
0
 void Awake()
 {
     _rb = GetComponent<Rigidbody>();
     _bounceBack = GetComponent<BounceBack>();
     _collSound = (AudioSource)gameObject.AddComponent<AudioSource>();
     _collSound.clip = (AudioClip)Resources.Load("Audio/coll2");
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        _bounceBack = GetComponent<BounceBack> ();
        _rb = GetComponent<Rigidbody> ();

        _rb.AddForce( transform.right * 500 );
    }