Exemple #1
0
        public override bool Initialise()
        {
            base.Initialise();

            try
            {
                ParseConfig_BaseType();

                ParsePoeNinja();
            }
            catch (Exception)
            {
            }

            Name = "INV Item Analyzer";

            var combine = Path.Combine(DirectoryFullName, "img", "GoodItem.png").Replace('\\', '/');

            Graphics.InitImage(combine, false);

            combine = Path.Combine(DirectoryFullName, "img", "Syndicate.png").Replace('\\', '/');
            Graphics.InitImage(combine, false);

            _ingameState  = GameController.Game.IngameState;
            _windowOffset = GameController.Window.GetWindowRectangle().TopLeft;

            Input.RegisterKey(Settings.HotKey.Value);
            Input.RegisterKey(Keys.LControlKey);

            Settings.HotKey.OnValueChanged += () => { Input.RegisterKey(Settings.HotKey.Value); };

            Settings.League.OnValueSelectedPre += s => { ParsePoeNinja(); };

            return(true);
        }
Exemple #2
0
 public override void Initialise()
 {
     base.Initialise();
     _ingameState  = GameController.Game.IngameState;
     _windowOffset = GameController.Window.GetWindowRectangle().TopLeft;
     MenuPlugin.KeyboardMouseEvents.MouseDownExt += KeyboardMouseEvents_MouseDownExt;
 }
Exemple #3
0
 private void PauseGame()
 {
     pauseScreen.ShowPauseScreen(true);
     Time.timeScale = 0;
     playerInput.BlockPlayerInput(true);
     currentGameState = IngameState.Paused;
 }
Exemple #4
0
 private void GameOver()
 {
     playerInput.BlockPlayerInput(true);
     playerHud.SetActive(false);
     currentGameState = IngameState.GameOver;
     pauseScreen.ShowGameOverScreen();
 }
Exemple #5
0
 public override bool Initialise()
 {
     base.Initialise();
     Name        = "Exertion";
     ingameState = GameController.Game.IngameState;
     windowArea  = GameController.Window.GetWindowRectangle();
     return(true);
 }
Exemple #6
0
        private void SetupGameStates()
        {
            var ingame = new IngameState(this);
            var editor = new EditorState(this);

            gameStates.Add(ingame);
            gameStates.Add(editor);
            gameStates.Push <EditorState>();
        }
Exemple #7
0
        public override bool Initialise()
        {
            ReadProphecies();

            _ingameState  = GameController.Game.IngameState;
            _windowOffset = GameController.Window.GetWindowRectangle().TopLeft;

            return(true);
        }
Exemple #8
0
 public override bool Initialise()
 {
     base.Initialise();
     Name              = "Map Mod Notifications";
     windowArea        = GameController.Window.GetWindowRectangle();
     WarningDictionary = LoadConfig(Path.Combine(DirectoryFullName, "ModWarnings.txt"));
     ingameState       = GameController.Game.IngameState;
     return(true);
 }
Exemple #9
0
    public virtual void Fire(IngameState state, Vector2 mousePos)
    {
        Vector2 vector = state.camera.relativeXY(new Vector2(mousePos.X, mousePos.Y)) - firePosition;

        vector.Normalize();
        state.bullets.Add(new Bullet(firePosition, vector, damage, true));
        gunSound.Play();
        timeSinceShot = 0;
    }
Exemple #10
0
    /// <summary>
    /// Call Ingame_Revive event.
    /// </summary>
    public void Revive()
    {
        //Fire event
        IngameState = IngameState.Ingame_Revive;
        ingameState = IngameState.Ingame_Revive;

        //Add another actions here
        PauseBackgroundMusic(0.5f);
    }
Exemple #11
0
        public override bool Initialise()
        {
            base.Initialise();
            Name = "UnIdy";

            _ingameState  = GameController.Game.IngameState;
            _windowOffset = GameController.Window.GetWindowRectangle().TopLeft;
            return(true);
        }
Exemple #12
0
    /// <summary>
    /// Call Ingame_GameOver event.
    /// </summary>
    public void GameOver()
    {
        //Fire event
        IngameState = IngameState.Ingame_GameOver;
        ingameState = IngameState.Ingame_GameOver;

        //Add another actions here
        StopBackgroundMusic(0f);
    }
Exemple #13
0
        public void roundEnd()
        {
            state = IngameState.END;

            for (int i = 0; i < ingCandids.Count; i++)
            {
                ingCandids[i].gpEnd();
            }
        }
Exemple #14
0
        public void roundRestart()
        {
            for (int i = 0; i < ingCandids.Count; i++)
            {
                ingCandids[i].gpRestart();
            }

            state = IngameState.LIVE;
        }
Exemple #15
0
        public void roundSetup()
        {
            for (int i = 0; i < ingCandids.Count; i++)
            {
                ingCandids[i].gpSetup();
            }

            state = IngameState.PRIMED;
        }
Exemple #16
0
 private void UnpauseGame()
 {
     pauseScreen.ShowPauseScreen(false);
     Time.timeScale = 1;
     if (blockPlayerCoroutine == null)
     {
         playerInput.BlockPlayerInput(false);
     }
     currentGameState = IngameState.Running;
 }
Exemple #17
0
 public override bool Initialise()
 {
     base.Initialise();
     Name              = "Map Mod Notifications";
     windowArea        = GameController.Window.GetWindowRectangle();
     WarningDictionary = LoadConfigs();
     gameController    = GameController;
     ingameState       = gameController.IngameState;
     BuildRegions();
     return(true);
 }
Exemple #18
0
    public Player(IngameState game)
    {
        this.game = game;

        wheels      = new PlayerWheels();
        chassis     = new PlayerChassis();
        turretLeft  = new PlayerTurretInaccurate();
        turretRight = new PlayerTurretSpread();

        this.healthbar = new Healthbar(chassis.graphic);
    }
Exemple #19
0
        public override bool Initialise()
        {
            base.Initialise();
            Name = "AutoOpen";

            ingameState  = GameController.Game.IngameState;
            windowOffset = GameController.Window.GetWindowRectangle().TopLeft;
            loadDoorBlacklist();
            loadSwitchBlacklist();
            loadChestWhitelist();
            return(true);
        }
Exemple #20
0
    public Enemy(Vector2 position, float health, Texture2D graphic, float speed, int spawnSlotSize, IngameState gameState)
    {
        this.position      = position;
        this.health        = health;
        maxHealth          = health;
        this.graphic       = graphic;
        this.speed         = speed;
        this.spawnSlotSize = spawnSlotSize;
        this.gameState     = gameState;

        this.healthbar = new Healthbar(graphic);
    }
Exemple #21
0
        public override bool Initialise()
        {
            // ReadProphecies();

            ParsingPoeNinja();

            _ingameState  = GameController.Game.IngameState;
            _windowOffset = GameController.Window.GetWindowRectangle().TopLeft;

            Settings.League.OnValueSelectedPre += s => { ParsingPoeNinja(); };

            return(true);
        }
Exemple #22
0
        public override void Initialise()
        {
            _callPluginEventMethod = typeof(PluginExtensionPlugin).GetMethod("CallPluginEvent");
            _ingameState           = GameController.Game.IngameState;

            SaveDefaultConfigsToDisk();

            var filtersLines = File.ReadAllLines(Path.Combine(PluginDirectory, FITERS_CONFIG_FILE));

            _customFilters = FilterParser.Parse(filtersLines);

            CheckRefillCurrencyTypes();
            _playerHasDropdownMenu = _ingameState.ServerData.StashPanel.TotalStashes > 10;
        }
Exemple #23
0
 public override bool Initialise()
 {
     base.Initialise();
     Name            = "Proximity Alerts";
     ingameState     = GameController.Game.IngameState;
     soundController = GameController.SoundController;
     windowArea      = GameController.Window.GetWindowRectangle();
     Graphics.InitImage(Path.Combine(DirectoryFullName, "textures", "Direction-Arrow.png"), false);
     Graphics.InitImage(Path.Combine(DirectoryFullName, "textures", "back.png"), false);
     soundDir = Path.Combine(DirectoryFullName, "sounds");
     PathDict = LoadConfig(Path.Combine(DirectoryFullName, "config", "PathAlerts.txt"));
     ModDict  = LoadConfig(Path.Combine(DirectoryFullName, "config", "ModAlerts.txt"));
     return(true);
 }
        public override bool Initialise()
        {
            base.Initialise();
            Name         = "HighlightedItems";
            ingameState  = GameController.Game.IngameState;
            windowOffset = GameController.Window.GetWindowRectangle().TopLeft;

            var pickBtn  = Path.Combine(DirectoryFullName, "images\\pick.png").Replace('\\', '/');
            var pickLBtn = Path.Combine(DirectoryFullName, "images\\pickL.png").Replace('\\', '/');

            Graphics.InitImage(pickBtn, false);
            Graphics.InitImage(pickLBtn, false);

            return(true);
        }
Exemple #25
0
        private void GameManager_GameStateChanged(IngameState obj)
        {
            if (IngameManager.Instance.IngameState == IngameState.Ingame_Playing)
            {
                timeText.gameObject.SetActive(true);
                StartTimer();
            }

            else if (obj == IngameState.Ingame_GameOver || obj == IngameState.Ingame_CompletedLevel)
            {
                timeText.gameObject.SetActive(false);
                _timerIsRunning = false;
                timeRemaining   = timeAvailable;
            }
        }
Exemple #26
0
    /// <summary>
    /// Call Ingame_CompletedLevel event.
    /// </summary>
    public void CompletedLevel()
    {
        //Fire event
        IngameState = IngameState.Ingame_CompletedLevel;
        ingameState = IngameState.Ingame_CompletedLevel;

        //Other actions
        StopBackgroundMusic(0f);

        //Save level
        if (testingLevel == 0)
        {
            PlayerPrefs.SetInt(PlayerPrefsKey.SAVED_LEVEL_PPK, PlayerPrefs.GetInt(PlayerPrefsKey.SAVED_LEVEL_PPK) + 1);
        }
    }
Exemple #27
0
 public override bool Initialise()
 {
     base.Initialise();
     Name         = "Proximity Alerts";
     _ingameState = GameController.Game.IngameState;
     lock (Locker) _soundController = GameController.SoundController;
     _windowArea = GameController.Window.GetWindowRectangle();
     Graphics.InitImage(Path.Combine(DirectoryFullName, "textures\\Direction-Arrow.png").Replace('\\', '/'),
                        false);
     Graphics.InitImage(Path.Combine(DirectoryFullName, "textures\\back.png").Replace('\\', '/'), false);
     lock (Locker) _soundDir = Path.Combine(DirectoryFullName, "sounds\\").Replace('\\', '/');
     _pathDict = LoadConfig(Path.Combine(DirectoryFullName, "PathAlerts.txt"));
     _modDict  = LoadConfig(Path.Combine(DirectoryFullName, "ModAlerts.txt"));
     SetFonts();
     return(true);
 }
Exemple #28
0
    public override void Fire(IngameState state, Microsoft.Xna.Framework.Vector2 mousePos)
    {
        Vector2 vector = state.camera.relativeXY(new Vector2(mousePos.X, mousePos.Y)) - firePosition;

        vector.Normalize();

        //The angle by which we rotate the bullet vectors by for spread shot.
        float angle = (float)state.rand.Next(-100, 100) / 1000;

        //Creating and using a Matrix to rotate the line by an angle.
        Matrix rotMatrix = Matrix.CreateRotationZ(angle);

        state.bullets.Add(new Bullet(firePosition, Vector2.Transform(vector, rotMatrix), damage, true));

        gunSound.Play();
        timeSinceShot = 0;
    }
    private void GameManager_GameStateChanged(IngameState obj)
    {
        if (obj == IngameState.Ingame_Revive)
        {
            StartCoroutine(CRShowReviveView());
        }
        else if (obj == IngameState.Ingame_GameOver || obj == IngameState.Ingame_CompletedLevel)
        {
            StartCoroutine(CRShowEndGameView());
        }
        else if (obj == IngameState.Ingame_Playing)
        {
            playingViewControl.gameObject.SetActive(true);
            playingViewControl.OnShow();

            reviveViewControl.gameObject.SetActive(false);
            endGameViewControl.gameObject.SetActive(false);
        }
    }
Exemple #30
0
    /// <summary>
    /// Actual start the game (call Ingame_Playing event).
    /// </summary>
    public void PlayingGame()
    {
        //Fire event
        IngameState = IngameState.Ingame_Playing;
        ingameState = IngameState.Ingame_Playing;

        //Other actions

        if (IsRevived)
        {
            ResumeBackgroundMusic(0.5f);
            previousStageControl.CreateBall();
            cameraRootControl.ResetRotationToDefault();
            cRCheckingGameOver = StartCoroutine(CRCheckingGameOver());
        }
        else
        {
            PlayBackgroundMusic(0.5f);
        }
    }