Exemplo n.º 1
0
 static CallbackHandler()
 {
     touchStartedCB  = new TouchEventDelegate(touchStarted);
     touchEndedCB    = new TouchEventDelegate(touchEnded);
     touchMovedCB    = new TouchEventDelegate(touchMoved);
     touchCanceledCB = new TouchEventCanceledDelegate(allTouchesCanceled);
 }
Exemplo n.º 2
0
    /// <summary>
    /// Beginning of the game logic loop. The batter is at bat, the game details are displayed, waiting for player input.
    /// </summary>
    private void StartBatter()
    {
        State = States.Waiting;

        // set up batter
        ShowBatter();

        // show / update scoreboard stuff
        string scoreBoardString = "Batter Up!      " + InningType + " of the " + Inning + "th \n";

        if (CurrentPlayer == 1)
        {
            scoreBoardString += HomeName + " at bat! \n";
        }
        else
        {
            scoreBoardString += VisitorName + " at bat! \n";
        }
        scoreBoardString           += "Strikes: " + Strikes + "  Outs: " + Outs + "\n \n";
        scoreBoardString           += HomeName + " Score: " + HomeScore + "  \n" + VisitorName + " Score: " + VisitorScore + " \n \n";
        scoreBoardString           += Runners.Count + " runners! Tap to roll!";
        ScoreboardTextInstance.text = scoreBoardString;

        // add a touch event handler - player touch sends game into dice roll mode
        // todo do we want the AI to do this automatically?
        TouchEvent += new TouchEventDelegate(DiceView);
    }
Exemplo n.º 3
0
 private void DiceView()
 {
     // initial camera movement todo follows intro prompts
     //StartCoroutine( MoveCameraAfterSeconds( 3f, 0 ) );
     WaitBeforeDoing(1f, new WaitBeforeDoingDelegate(cameraController.ZoomToDice));
     cameraController.StartedMoving  += new GameCamera.CameraEventHandler(ClearScoreboard);
     cameraController.FinishedMoving += new GameCamera.CameraEventHandler(MakeDiceThrowable);
     TouchEvent -= new TouchEventDelegate(DiceView);
 }
Exemplo n.º 4
0
        private static extern IntPtr MultiTouch_new(IntPtr nativeWindow, TouchEventDelegate touchStartedCB, TouchEventDelegate touchEndedCB, TouchEventDelegate touchMovedCB, TouchEventCanceledDelegate touchCanceledCB
#if FULL_AOT_COMPILE
                                                    , IntPtr instanceHandle
#endif
                                                    );
Exemplo n.º 5
0
    /// <summary>
    /// Beginning of the game logic loop. The batter is at bat, the game details are displayed, waiting for player input.
    /// </summary>
    private void StartBatter()
    {
        State = States.Waiting;

        // set up batter
        ShowBatter();

        // show / update scoreboard stuff
        string scoreBoardString = "Batter Up!      " + InningType + " of the " + Inning + "th \n";
        if (CurrentPlayer == 1)
        {
            scoreBoardString += HomeName + " at bat! \n";
        }
        else
        {
            scoreBoardString += VisitorName + " at bat! \n";
        }
        scoreBoardString += "Strikes: " + Strikes + "  Outs: " + Outs + "\n \n";
        scoreBoardString += HomeName + " Score: " + HomeScore + "  \n" + VisitorName + " Score: " + VisitorScore + " \n \n";
        scoreBoardString += Runners.Count + " runners! Tap to roll!";
        ScoreboardTextInstance.text = scoreBoardString;

        // add a touch event handler - player touch sends game into dice roll mode
        // todo do we want the AI to do this automatically?
        TouchEvent += new TouchEventDelegate( DiceView );
    }
Exemplo n.º 6
0
 private void DiceView()
 {
     // initial camera movement todo follows intro prompts
     //StartCoroutine( MoveCameraAfterSeconds( 3f, 0 ) );
     WaitBeforeDoing( 1f, new WaitBeforeDoingDelegate( cameraController.ZoomToDice ) );
     cameraController.StartedMoving += new GameCamera.CameraEventHandler( ClearScoreboard );
     cameraController.FinishedMoving += new GameCamera.CameraEventHandler( MakeDiceThrowable );
     TouchEvent -= new TouchEventDelegate( DiceView );
 }