Exemplo n.º 1
0
 private void Idle()
 {
     if (--idleCount <= 0)
     {
         mState = BerryState.Walking;
         UpdateState();
     }
 }
Exemplo n.º 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;
    }
Exemplo n.º 3
0
 private void Throwing()
 {
     if (throwingCount-- <= 0)
     {
         throwingCount = ThrowingCount;
         mState        = BerryState.Throw;
         UpdateState();
     }
 }
Exemplo n.º 4
0
 private void Walking()
 {
     rigidbody2D.velocity = new Vector2(-walkSpeed, 0);
     if (rigidbody2D.position.x < 9.6)
     {
         mState = BerryState.Throwing;
         UpdateState();
     }
 }
Exemplo n.º 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));
        }
    }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 8
0
 private void Idle()
 {
     if(--idleCount <= 0)
     {
         mState = BerryState.Walking;
         UpdateState ();
     }
 }
Exemplo n.º 9
0
 private void Walking()
 {
     rigidbody2D.velocity = new Vector2(-walkSpeed, 0);
     if(rigidbody2D.position.x < 9.6)
     {
         mState = BerryState.Throwing;
         UpdateState ();
     }
 }
Exemplo n.º 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;
    }
Exemplo n.º 11
0
 private void Throwing()
 {
     if(throwingCount-- <= 0)
     {
         throwingCount = ThrowingCount;
         mState = BerryState.Throw;
         UpdateState ();
     }
 }
Exemplo n.º 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));
        }
    }