public MainWindow(string objectiveCriteria, string coderName) { InitializeComponent(); mVideoPlayer = new VideoPlayer(VideoPlayerHolder); mObjectiveCriteria = new ObjectiveCriteria(ObjectiveCriteriaHolder, objectiveCriteria); mJoystickAnnotate = new JoystickAnnotate(GamePadAnnotationHolder); mLogging = new Logging(LoggingDetailsHolder, objectiveCriteria, coderName); mLevelChange = new LevelChange(LevelChangeHolder); mState = APPSTATE.NONE; mTimer = new DispatcherTimer(); mTimer.Interval = TimeSpan.FromMilliseconds(200); mTimer.Tick += new EventHandler(TimerTick); mTimer.Start(); mPausableLoggingTimer = new System.Timers.Timer(); mPausableLoggingTimer.Elapsed += new ElapsedEventHandler(LogInterval); mPausableLoggingTimer.Interval = 200; mPausableLoggingTimer.Enabled = false; mStartupCheckTimer = new DispatcherTimer(); mStartupCheckTimer.Interval = TimeSpan.FromMilliseconds(250); mStartupCheckTimer.Tick += new EventHandler(mStartupCheckTimerTick); mStartupCheckTimer.Start(); mJoystickTickTimer = new DispatcherTimer(); mJoystickTickTimer.Interval = TimeSpan.FromMilliseconds(10); mJoystickTickTimer.Tick += new EventHandler(JoystickTick); mJoystickTickTimer.Start(); }
void ChangeAppState(APPSTATE newState) { switch (currentAppState_) { case APPSTATE.MAINMENU: break; case APPSTATE.PLAYING: break; case APPSTATE.GAMEOVER: break; } currentAppState_ = newState; switch (currentAppState_) { case APPSTATE.MAINMENU: break; case APPSTATE.PLAYING: StartGame(); break; case APPSTATE.GAMEOVER: break; } }
// Use this for initialization void Start() { //camera_ = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Main_Camera_Behaviour>(); // set camera to start position camera_.transform.position = mainMenuLocation_; camera_.transform.eulerAngles = mainMenuRotation_; // set all the interactables for each step stepInteractables_ = new List <List <int> >(); stepInteractables_.Add(new List <int> { 0, 1 }); stepInteractables_.Add(new List <int> { 0, 1, 2, 3 }); stepInteractables_.Add(new List <int> { 0 }); stepInteractables_.Add(new List <int> { 1 }); stepInteractables_.Add(new List <int> { 0 }); stepInteractables_.Add(new List <int> { 1 }); stepInteractables_.Add(new List <int> { 0 }); stepInteractables_.Add(new List <int> { 1 }); stepInteractables_.Add(new List <int> { 0 }); stepInteractables_.Add(new List <int> { 1 }); stepInteractables_.Add(new List <int> { 0 }); activeInteractables_ = new List <BaseInteractable>(); // set app state to main menu currentAppState_ = APPSTATE.MAINMENU; }