public KeyEvent(GameObject input, GameBounds gb) { moveNow = false; cursor = input; gameBounds = gb; original_Speed = 1; speed = original_Speed; }
public BallEvent(GameObject input, GameBounds gb) { ball = input; gameBounds = gb; changedState = true; velocityX = 1; velocityY = 3; order = -1; radius = ball.GetComponent <CircleCollider2D> ().radius; ballCollisionDetector = ball.GetComponent <BallCollisionDetector> (); outOfBounds = false; }
void Awake() { networkOrder = -1; //Instantiate Game Logic gameBounds = new GameBounds(-3.8f, 3.8f, 2.4f, -2.4f); KeyboardInput = new KeyEvent(myCursor, gameBounds); BallLogic = new BallEvent(Ball, gameBounds); life = 3; //Position the Objects Reset(); //Load Level gameState = GameState.Start; stageParser = StageParser.Instance; }