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