Пример #1
0
    void Start()
    {
        projectileVelocity = 3;
        myAnimator         = GetComponent <Animator> ();
        disable            = GetComponent <DisableButton> ();

        //starting in _ will be played every _
        InvokeRepeating("Shoot", 1f, 2f);
        InvokeRepeating("ShootThree", 2f, 2f);
        InvokeRepeating("ShootTwo", 2f, 2f);
    }
Пример #2
0
 private void DisablePingButton(bool ornot)
 {
     if (button1.InvokeRequired)
     {
         DisableButton d = new DisableButton(DisablePingButton);
         Invoke(d, new object[] { ornot });
     }
     else
     {
         button1.Enabled = ornot;
     }
 }