コード例 #1
0
        public KeyEvent(GameObject input, GameBounds gb)
        {
            moveNow    = false;
            cursor     = input;
            gameBounds = gb;

            original_Speed = 1;
            speed          = original_Speed;
        }
コード例 #2
0
ファイル: BallEvent.cs プロジェクト: knk1002/CS429_week2
        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;
        }
コード例 #3
0
        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;
        }