示例#1
0
        public void AddRandomForceToBall()
        {
            // random positive y and -1 to +1 x.
            float x = 0.0f; // Random.Range(-1.0f, 1.0f) * 10.0f;
            float y = 15.0f;

            mRb2D.AddForce(new Vector2(x, y), ForceMode2D.Impulse);

            mGame.SetState(GameState.StateID.PLAYING);
        }
示例#2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     Debug.Log("You have lost the game");
     mBreakout.SetState(GameState.StateID.LOSE);
 }