Пример #1
0
 private void Idle()
 {
     if (--idleCount <= 0)
     {
         mState = BerryState.Walking;
         UpdateState();
     }
 }
Пример #2
0
    private void Wahhh()
    {
        springController.ExtendSpring();

        AudioSource.PlayClipAtPoint(audio.clip, new Vector3(0, 0, 0));
        gameObject.rigidbody2D.fixedAngle = false;
        gameObject.rigidbody2D.velocity   = new Vector2(-22, 0);
        mState = BerryState.End;
    }
Пример #3
0
 private void Throwing()
 {
     if (throwingCount-- <= 0)
     {
         throwingCount = ThrowingCount;
         mState        = BerryState.Throw;
         UpdateState();
     }
 }
Пример #4
0
 private void Walking()
 {
     rigidbody2D.velocity = new Vector2(-walkSpeed, 0);
     if (rigidbody2D.position.x < 9.6)
     {
         mState = BerryState.Throwing;
         UpdateState();
     }
 }
Пример #5
0
    private void Throw()
    {
        if (throwCount-- <= 0)
        {
            throwCount = ThrowCount;
            mState     = BerryState.Throwing;
            UpdateState();

            GameObject cat = (GameObject)Instantiate(kitty);
            cat.SetActive(true);
            cat.rigidbody2D.velocity = new Vector2(Random.Range(-25, 0), Random.Range(-1, 3));
        }
    }
Пример #6
0
 public void AddButton(int id)
 {
     if (!buttons.Contains(id))
     {
         buttons.Add(id);
     }
     if (buttons.Count == 3)
     {
         mState = BerryState.Wahhh;
         UpdateState();
         return;
     }
     Debug.Log(buttons.Count);
 }
Пример #7
0
 public void AddButton(int id)
 {
     if(!buttons.Contains (id))
     {
         buttons.Add (id);
     }
     if(buttons.Count == 3)
     {
         mState = BerryState.Wahhh;
         UpdateState();
         return;
     }
     Debug.Log (buttons.Count);
 }
Пример #8
0
 private void Idle()
 {
     if(--idleCount <= 0)
     {
         mState = BerryState.Walking;
         UpdateState ();
     }
 }
Пример #9
0
 private void Walking()
 {
     rigidbody2D.velocity = new Vector2(-walkSpeed, 0);
     if(rigidbody2D.position.x < 9.6)
     {
         mState = BerryState.Throwing;
         UpdateState ();
     }
 }
Пример #10
0
    private void Wahhh()
    {
        springController.ExtendSpring();

        AudioSource.PlayClipAtPoint(audio.clip, new Vector3(0, 0, 0));
        gameObject.rigidbody2D.fixedAngle = false;
        gameObject.rigidbody2D.velocity = new Vector2(-22, 0);
        mState = BerryState.End;
    }
Пример #11
0
 private void Throwing()
 {
     if(throwingCount-- <= 0)
     {
         throwingCount = ThrowingCount;
         mState = BerryState.Throw;
         UpdateState ();
     }
 }
Пример #12
0
    private void Throw()
    {
        if(throwCount-- <= 0)
        {
            throwCount = ThrowCount;
            mState = BerryState.Throwing;
            UpdateState();

            GameObject cat = (GameObject)Instantiate (kitty);
            cat.SetActive(true);
            cat.rigidbody2D.velocity = new Vector2(Random.Range (-25, 0), Random.Range (-1, 3));
        }
    }