Exemple #1
0
        void Start()
        {
            forwardMovment fm = this.gameObject.AddComponent <forwardMovment>();

            exp  = this.gameObject.GetComponent <Explosion>();
            anim = this.gameObject.transform.GetChild(0).GetComponent <Animator>();

            if (inEditing)
            {
                noteUiView = this.gameObject.transform.GetChild(1).GetComponent <NoteUiView>();
                noteUiView.Activate(note);
                sounds = FindObjectOfType <SoundsLibrary>();
                audio  = this.gameObject.AddComponent <AudioSource>();
                OnMouseDown();
            }
        }
Exemple #2
0
 void Start()
 {
     audioSource  = this.gameObject.GetComponent <AudioSource>();
     currentPress = null;
     sounds       = FindObjectOfType <SoundsLibrary>();
 }