Beispiel #1
0
 private static void FootStepSound(Living living, Tile footStepsOn)
 {
     if (living.FootStepTimer.Allow())
     {
         FMODUtil.RaiseEvent(EffectsTable.FootSteps, "Material", footStepsOn.FootStepSound);
     }
 }
Beispiel #2
0
 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);
 }
Beispiel #5
0
 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);
 }
Beispiel #6
0
 private void MainMenuButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e)
 {
     FMODUtil.RaiseEvent(SoundsTable.UIClick);
     MenuHandler.Clear();
     if (FromMainMenu)
     {
         MainMenu.MainMenu.Initialize();
     }
 }
Beispiel #7
0
 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);
 }
Beispiel #8
0
 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);
 }
Beispiel #9
0
 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);
 }
Beispiel #10
0
        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());
            }
        }
Beispiel #11
0
        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());
            }
        }
Beispiel #12
0
        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);
            }
        }
Beispiel #15
0
        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);
            }
        }
Beispiel #16
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);
 }
Beispiel #18
0
 protected override List <Item> MinePercent(float percentMined)
 {
     FMODUtil.RaiseEvent(EffectsTable.PickaxeHit);
     return(null);
 }
Beispiel #19
0
 protected override List <Item> MinePercent(float percentMined, Point2D position)
 {
     FMODUtil.RaiseEvent(SoundsTable.PickaxeHit, "", 0, position);
     return(null);
 }
Beispiel #20
0
 public override void Click(MouseEventArgs e)
 {
     FMODUtil.RaiseEvent(EffectsTable.UIClick);
     //Open load game menu  here
 }
Beispiel #21
0
 private void NewGameButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e)
 {
     FMODUtil.RaiseEvent(SoundsTable.UIClick);
     NewWorldMenu.Initialize();
     MainMenu.MainMenuID.PopupChild(NewWorldMenu.NewWorldMenuM);
 }
Beispiel #22
0
 public override void Click(MouseEventArgs e, GUIContainer container)
 {
     FMODUtil.RaiseEvent(EffectsTable.UIClick);
     UniversalEvents.GameExitHandler();
 }
Beispiel #23
0
 public override void Click(MouseEventArgs e, GUIContainer container)
 {
     FMODUtil.RaiseEvent(EffectsTable.UIClick);
     NewWorldMenu.Initialize();
     MainMenu.MainMenuID.PopupChild(NewWorldMenu.NewWorldMenuM);
 }
Beispiel #24
0
 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);
 }
Beispiel #26
0
 private void JoinGameButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e)
 {
     FMODUtil.RaiseEvent(SoundsTable.UIClick);
     JoinGameMenu.Initialize();
     MainMenu.MainMenuID.PopupChild(JoinGameMenu.Menu);
 }
Beispiel #27
0
 protected override List <Item> TillPercent(float percent, Point2D position)
 {
     FMODUtil.RaiseEvent(SoundsTable.PickaxeHit, "", 0, position);
     return(default);
Beispiel #28
0
 private void QuitButton_ClickEvent(object sender, Reusable.Event.ClickEventArgs e)
 {
     FMODUtil.RaiseEvent(SoundsTable.UIClick);
 }
Beispiel #29
0
 public override void Click(MouseEventArgs e, GUIContainer container)
 {
     FMODUtil.RaiseEvent(SoundsTable.UIClick);
     LoadGameMenu.Initialize();
     MainMenu.MainMenuID.PopupChild(LoadGameMenu.Menu);
 }
Beispiel #30
0
 public override void Click(MouseEventArgs e)
 {
     FMODUtil.RaiseEvent(EffectsTable.UIClick);
     JoinGameMenu.Initialize();
 }