/// <summary> /// Handles updating the main menu selection screen /// </summary> public static void Update() { // Update the HandleInput so that the HandleInput state doesn't bleed into the base update loop // I.E pressing 1 in the main menu screen leads to updating the mode selection screen // with unupdated HandleInputs meaning that 1 is still perceived to be pressed HandleInput.Update(); // Check if 1 was pressed if (HandleInput.WasKeyPressed(Keys.D1)) { // Update the scene to the mode selection screen GameBase.State = GameBase.GameState.ModeSelection; } // Check if 2 was pressed else if (HandleInput.WasKeyPressed(Keys.D2)) { // Update the scene to the instructions screen GameBase.State = GameBase.GameState.Instructions; } // Check if 3 was pressed else if (HandleInput.WasKeyPressed(Keys.D3)) { // Update the scene to the instructions screen GameBase.Instance.Exit(); } }
/// <summary> /// Handles updating the mode selection screen /// </summary> public static void Update() { // Update the HandleInput so that the HandleInput state doesn't bleed into the base update loop // I.E pressing 1 in the main menu screen leads to updating the mode selection screen // with unupdated HandleInputs meaning that 1 is still perceived to be pressed HandleInput.Update(); // Check if 1 was pressed if (HandleInput.WasKeyPressed(Keys.D1)) { // Update the scene to the classic gameplay screen GameBase.State = GameBase.GameState.ClassicGameplay; } // Check if 2 was pressed else if (HandleInput.WasKeyPressed(Keys.D2)) { // Update the scene to the free gameplay screen GameBase.State = GameBase.GameState.FreeGameplay; } // Check if 3 was pressed else if (HandleInput.WasKeyPressed(Keys.D3)) { // Update the scene to the main menu screen GameBase.State = GameBase.GameState.MainMenu; } }
private void Start() { hi = GameObject.FindWithTag("Information").GetComponent <HandleInput>(); WeatherTut = GameObject.FindWithTag("WeatherTut"); WeatherTut.GetComponent <Canvas>().enabled = false; }
public static void Main() { ICalculateTollFees calculateTollFees = new CalculateTollFees(); HandleInput handleInput = new HandleInput(calculateTollFees); fee = handleInput.RunTextFile(Path); Console.Write($"The total fee for valid dates the inputfile is {fee}"); }
// Start is called before the first frame update void Start( ) { score = 0f; bComboing = false; combo = 0; input = new HandleInput(raycaster, eventSystem); noteObjectPool.Init( ); SetUIAndGetSheet("DEFAULT"); aFx.Play( ); }
public void ParseDates_Should_Always_Include_All_Input() { //Arrange var sut = new HandleInput(new CalculateTollFees()); var input = new string[2] { "2020-06-30 00:05", "2020-06-30 06:34" }; //Act var actual = sut.ParseDates(input); //Assert sut.dates.Should().HaveCount(input.Length); }
/// <summary> /// Updates all classes regarding gameplay processes /// </summary> public void Update() { // Update the HandleInput so that the HandleInput state doesn't bleed into the base update loop // I.E pressing 1 in the main menu screen leads to updating the mode selection screen // with unupdated HandleInputs meaning that 1 is still perceived to be pressed HandleInput.Update(); // Update all gameplay processes PlayerStatus.Update(); EntityManager.Update(); EnemySpawner.Update(); GameBase.ParticleManager.Update(); }
public void SortData_should_sort_data_in_order() { //Arrange var sut = new HandleInput(new CalculateTollFees()); var input = new DateTime[] { new DateTime(2020, 5, 1).AddHours(9).AddMinutes(31), new DateTime(2020, 4, 1).AddHours(7).AddMinutes(31), new DateTime(2021, 4, 1).AddHours(10).AddMinutes(31), new DateTime(2020, 4, 2).AddHours(7).AddMinutes(31), }; var sorted = input.OrderBy(x => x).ToArray(); //Act var actual = sut.SortData(input); //Assert actual[0].Should().Be(sorted[0]); actual[1].Should().Be(sorted[1]); actual[2].Should().Be(sorted[2]); actual[3].Should().Be(sorted[3]); }
private void Start() { handleInput = GetComponent <HandleInput>(); }
void Awake() { _rigidBody = GetComponent <Rigidbody>(); _handleInput = GetComponent <HandleInput>(); _playerEvents = GetComponent <PlayerEvents>(); }