private static void FootStepSound(Living living, Tile footStepsOn) { if (living.FootStepTimer.Allow()) { FMODUtil.RaiseEvent(EffectsTable.FootSteps, "Material", footStepsOn.FootStepSound); } }
protected override List <Item> HarvestPercent(double percent, Point2D position) { if (!string.IsNullOrWhiteSpace(this.HarvestSound)) { Point2D screenPosition = new Point2D(position.X * Tile.GetTileSize().X, position.Y * Tile.GetTileSize().Y); FMODUtil.RaiseEvent(this.HarvestSound, "", 0, screenPosition); } return(default);
public override List <Item> Harvested(Point2D position) { if (this.CompletionSound != string.Empty) { FMODUtil.RaiseEvent(this.CompletionSound, "", 0, position); } return(this.Items); }
protected override List <Item> HarvestPercent(double percentMined, Point2D position) { if (this.HarvestSound != string.Empty) { FMODUtil.RaiseEvent(this.HarvestSound, "", 0, position); } return(null); }
public override List <Item> Harvested(Point2D position) { if (!string.IsNullOrWhiteSpace(this.CompletionSound)) { Point2D screenPosition = new Point2D(position.X * Tile.GetTileSize().X, position.Y * Tile.GetTileSize().Y); FMODUtil.RaiseEvent(this.CompletionSound, "", 0, screenPosition); } return(this.Items); }
private void MainMenuButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e) { FMODUtil.RaiseEvent(SoundsTable.UIClick); MenuHandler.Clear(); if (FromMainMenu) { MainMenu.MainMenu.Initialize(); } }
protected override List <Item> HarvestPercent(double percentMined, Point2D position) { if (this.HarvestSound != string.Empty) { Point2D screenPosition = new Point2D(position.X * Tile.GetTileSize().X, position.Y * Tile.GetTileSize().Y); FMODUtil.RaiseEvent(this.HarvestSound, "", 0, screenPosition); } return(null); }
private void JoinButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e) { World.Mode = MagicalLifeAPI.Networking.EngineMode.ClientOnly; FMODUtil.RaiseEvent(SoundsTable.UIClick); ClientSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(JoinGameMenu.Menu.IpInputBox.Text, int.Parse(JoinGameMenu.Menu.PortInputBox.Text))); Client.Load(); MenuHandler.Clear(); InGameGUI.Initialize(); BoundHandler.Popup(InGameGUI.InGame); }
public override void Click(MouseEventArgs e, GUIContainer container) { World.Mode = MagicalLifeAPI.Networking.EngineMode.ClientOnly; FMODUtil.RaiseEvent(EffectsTable.UIClick); ClientSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(JoinGameMenu.menu.IpInputBox.Text, int.Parse(JoinGameMenu.menu.PortInputBox.Text))); Client.Load(); MenuHandler.Clear(); InGameGUI.Initialize(); BoundHandler.Popup(InGameGUI.InGame); }
private static void FootStepSound(Living living, Tile footStepsOn) { if (living.FootStepTimer.Allow()) { Point2DFloat screenLocation = new Point2DFloat((float)living.TileLocation.X, (float)living.TileLocation.Y); screenLocation.X *= Tile.GetTileSize().X; screenLocation.Y *= Tile.GetTileSize().Y; FMODUtil.RaiseEvent(SoundsTable.FootSteps, "Material", footStepsOn.FootStepSound, screenLocation.ToPoint2D()); } }
private static void FootStepSound(Living living, Tile footStepsOn) { ComponentMovement movementComponent = living.GetExactComponent <ComponentMovement>(); if (movementComponent.FootStepTimer.Allow()) { Point2DFloat screenLocation = new Point2DFloat((float)movementComponent.TileLocation.X, (float)movementComponent.TileLocation.Y); screenLocation.X *= Tile.GetTileSize().X; screenLocation.Y *= Tile.GetTileSize().Y; FMODUtil.RaiseEvent(SoundsTable.FootSteps, "Material", footStepsOn.FootStepSound, screenLocation.ToPoint2D()); } }
public override void Click(MouseEventArgs e, GUIContainer container) { World.Mode = MagicalLifeAPI.Networking.EngineMode.ServerAndClient; Server.Load(); ClientSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings()); FMODUtil.RaiseEvent(EffectsTable.UIClick); ServerSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings()); Client.Load(); NewGameInputHandler a = new NewGameInputHandler(); a.StartNewGame(); Server.StartGame(); BoundHandler.RemoveContainer(NewWorldMenu.NewWorldMenuM); MenuHandler.Clear(); BoundHandler.HideAll(); InGameGUI.Initialize(); BoundHandler.Popup(InGameGUI.InGame); }
private void NewWorldNextButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e) { World.Mode = MagicalLifeAPI.Networking.EngineMode.ServerAndClient; Server.Load(); ClientSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(MagicalLifeAPI.Networking.EngineMode.ServerAndClient)); FMODUtil.RaiseEvent(SoundsTable.UIClick); //FMODUtil.RaiseEvent(SoundsTable.Ambience); ServerSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(MagicalLifeAPI.Networking.EngineMode.ServerAndClient)); Client.Load(); NewGameInputHandler a = new NewGameInputHandler(); a.StartNewGame(); Server.StartGame(); RenderInfo.Camera2D.InitializeForDimension(0); BoundHandler.RemoveContainer(NewWorldMenu.NewWorldMenuM); MenuHandler.Clear(); BoundHandler.HideAll(); InGameGUI.Initialize(); BoundHandler.Popup(InGameGUI.InGame); }
public override void Click(MouseEventArgs e, GUIContainer container) { int selected = LoadGameMenu.Menu.SaveSelectListBox.SelectedIndex; if (selected != -1) { FMODUtil.RaiseEvent(SoundsTable.UIClick); World.Mode = MagicalLifeAPI.Networking.EngineMode.ServerAndClient; RenderableString selectedItem = (RenderableString)LoadGameMenu.Menu.SaveSelectListBox.Items[selected]; WorldStorage.LoadWorld(selectedItem.Text); Server.Load(); ClientSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(MagicalLifeAPI.Networking.EngineMode.ServerAndClient)); ServerSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(MagicalLifeAPI.Networking.EngineMode.ServerAndClient)); Client.Load(); Server.StartGame(); BoundHandler.RemoveContainer(LoadGameMenu.Menu); MenuHandler.Clear(); BoundHandler.HideAll(); InGameGUI.Initialize(); BoundHandler.Popup(InGameGUI.InGame); } }
private void LoadSaveButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e) { int selected = LoadGameMenu.Menu.SaveSelectListBox.SelectedIndex; if (selected != -1) { FMODUtil.RaiseEvent(SoundsTable.UIClick); World.Mode = MagicalLifeAPI.Networking.EngineMode.ServerAndClient; RenderableString selectedItem = (RenderableString)LoadGameMenu.Menu.SaveSelectListBox.Items[selected]; WorldStorage.LoadWorld(selectedItem.Text); Server.Load(); ClientSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(MagicalLifeAPI.Networking.EngineMode.ServerAndClient)); ServerSendRecieve.Initialize(new MagicalLifeAPI.Networking.NetworkSettings(MagicalLifeAPI.Networking.EngineMode.ServerAndClient)); Client.Load(); Server.StartGame(); BoundHandler.RemoveContainer(LoadGameMenu.Menu); MenuHandler.Clear(); BoundHandler.HideAll(); InGameGUI.Initialize(); BoundHandler.Popup(InGameGUI.InGame); RenderInfo.Camera2D.InitializeForDimension(0); } }
public override void Click(MouseEventArgs e, GUIContainer container) { FMODUtil.RaiseEvent(EffectsTable.UIClick); JoinGameMenu.Initialize(); MainMenu.MainMenuID.PopupChild(JoinGameMenu.menu); }
public override void DoubleClick(MouseEventArgs e, GUIContainer container) { FMODUtil.RaiseEvent(SoundsTable.UIClick); }
protected override List <Item> MinePercent(float percentMined) { FMODUtil.RaiseEvent(EffectsTable.PickaxeHit); return(null); }
protected override List <Item> MinePercent(float percentMined, Point2D position) { FMODUtil.RaiseEvent(SoundsTable.PickaxeHit, "", 0, position); return(null); }
public override void Click(MouseEventArgs e) { FMODUtil.RaiseEvent(EffectsTable.UIClick); //Open load game menu here }
private void NewGameButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e) { FMODUtil.RaiseEvent(SoundsTable.UIClick); NewWorldMenu.Initialize(); MainMenu.MainMenuID.PopupChild(NewWorldMenu.NewWorldMenuM); }
public override void Click(MouseEventArgs e, GUIContainer container) { FMODUtil.RaiseEvent(EffectsTable.UIClick); UniversalEvents.GameExitHandler(); }
public override void Click(MouseEventArgs e, GUIContainer container) { FMODUtil.RaiseEvent(EffectsTable.UIClick); NewWorldMenu.Initialize(); MainMenu.MainMenuID.PopupChild(NewWorldMenu.NewWorldMenuM); }
private void OpenSettingsMenu() { FMODUtil.RaiseEvent(SoundsTable.UIClick); SettingsGameMenu.Initialize(false); InGameEscapeMenu.menu.PopupChild(SettingsGameMenu.Menu); }
private void Save() { FMODUtil.RaiseEvent(SoundsTable.UIClick); SaveGameMenu.Initialize(); InGameEscapeMenu.menu.PopupChild(SaveGameMenu.menu); }
private void JoinGameButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e) { FMODUtil.RaiseEvent(SoundsTable.UIClick); JoinGameMenu.Initialize(); MainMenu.MainMenuID.PopupChild(JoinGameMenu.Menu); }
protected override List <Item> TillPercent(float percent, Point2D position) { FMODUtil.RaiseEvent(SoundsTable.PickaxeHit, "", 0, position); return(default);
private void QuitButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e) { FMODUtil.RaiseEvent(SoundsTable.UIClick); }
public override void Click(MouseEventArgs e, GUIContainer container) { FMODUtil.RaiseEvent(SoundsTable.UIClick); LoadGameMenu.Initialize(); MainMenu.MainMenuID.PopupChild(LoadGameMenu.Menu); }
public override void Click(MouseEventArgs e) { FMODUtil.RaiseEvent(EffectsTable.UIClick); JoinGameMenu.Initialize(); }