static CallbackHandler() { touchStartedCB = new TouchEventDelegate(touchStarted); touchEndedCB = new TouchEventDelegate(touchEnded); touchMovedCB = new TouchEventDelegate(touchMoved); touchCanceledCB = new TouchEventCanceledDelegate(allTouchesCanceled); }
/// <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); }
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); }
private static extern IntPtr MultiTouch_new(IntPtr nativeWindow, TouchEventDelegate touchStartedCB, TouchEventDelegate touchEndedCB, TouchEventDelegate touchMovedCB, TouchEventCanceledDelegate touchCanceledCB #if FULL_AOT_COMPILE , IntPtr instanceHandle #endif );
/// <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 ); }
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 ); }