예제 #1
0
        public override void Call(GameTime gameTime, NaviState naviState)
        {
            if (typingStrings == null)
            {
                Initialize(naviState);

                typingStrings.lines.Add("You wanna foight mate?\n");
                typingStrings.lines.Add("\nI'll focken shank ya fam.");
                typingStrings.lines.Add("Or at least these arseholes will,\n\nI don't have hands.");

                previousState = 0;
                state         = 0;

                index = 0;
            }

            if (naviState.Type(typingStrings, gameTime, 0.01))
            {
                naviState.pointer.Scale = new Vector2(0.8f, 0.8f);

                typingStrings = null;

                typingStrings       = new TypingStrings();
                typingStrings.lines = new List <string>();
                typingStrings.lines.Add("Still no hands.");
                typingStrings.line          = "";
                typingStrings.previousLines = "";

                naviState.BattleBegin(potentialTroops);
            }
        }
예제 #2
0
파일: Event.cs 프로젝트: Ammybinks/RPG-Game
        internal void Complete(NaviState naviState)
        {
            naviState.ActivateState(0);

            naviState.currentEvent = null;

            typingStrings = null;
        }
예제 #3
0
        internal void Complete(NaviState naviState)
        {
            naviState.ActivateState(0);

            naviState.eventMover = null;

            naviState.pointer.Scale = new Vector2(0.8f, 0.8f);

            typingStrings = null;
        }
예제 #4
0
        public virtual void Call(GameTime gameTime, NaviState naviState)
        {
            if (typingStrings == null)
            {
                typingStrings       = new TypingStrings();
                typingStrings.lines = new List <string>();
                typingStrings.lines.Add("");
                typingStrings.line          = "";
                typingStrings.previousLines = "";

                if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X, gridPosition.Y + 1))
                {
                    setCurrentFrame(1, 0);
                }
                else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X - 1, gridPosition.Y))
                {
                    setCurrentFrame(1, 1);
                }
                else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X + 1, gridPosition.Y))
                {
                    setCurrentFrame(1, 2);
                }
                else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X, gridPosition.Y - 1))
                {
                    setCurrentFrame(1, 3);
                }

                previousState = 0;
                state         = 0;
            }

            if (state == 0)
            {
                Idle(naviState, gameTime);
            }
            else if (state == 1)
            {
                ChoiceMenu(naviState, gameTime);
            }
        }
예제 #5
0
        internal void Initialize(NaviState naviState)
        {
            box = new Box();

            box.frameWidth  = 800;
            box.frameHeight = 200;
            box.UpperLeft   = new Vector2(560, 880);
            box.buttons     = new List <Button>();

            box.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture);

            allBoxes.Add(box);

            PointerReset(naviState);

            typingStrings               = new TypingStrings();
            typingStrings.lines         = new List <string>();
            typingStrings.line          = "";
            typingStrings.previousLines = "";

            if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X, gridPosition.Y + 1))
            {
                setCurrentFrame(1, 0);
            }
            else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X - 1, gridPosition.Y))
            {
                setCurrentFrame(1, 1);
            }
            else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X + 1, gridPosition.Y))
            {
                setCurrentFrame(1, 2);
            }
            else if (naviState.heroMover.gridPosition == new Vector2(gridPosition.X, gridPosition.Y - 1))
            {
                setCurrentFrame(1, 3);
            }
        }
예제 #6
0
        internal override void Idle(NaviState naviState, GameTime gameTime)
        {
            if (typingStrings.line == "What do you think? Do you agree with him?")
            {
                Choice1(naviState);
            }
            else if (typingStrings.line == "So? What do you want?" || typingStrings.line == "Well, whatever. How can I help you?" || typingStrings.line == "What can I do for you?")
            {
                Choice2(naviState);
            }
            else
            {
                if (naviState.Type(typingStrings, gameTime, 0.01))
                {
                    Complete(naviState);

                    typingStrings       = new TypingStrings();
                    typingStrings.lines = new List <string>();
                    typingStrings.lines.Add("What can I do for you?");
                    typingStrings.line          = "";
                    typingStrings.previousLines = "";
                }
            }
        }
예제 #7
0
        public override bool Call(GameTime gameTime, NaviState naviState)
        {
            if (typingStrings == null)
            {
                naviState.currentEvent = this;

                eventBox = new Box();

                eventBox.frameWidth  = 800;
                eventBox.frameHeight = 200;
                eventBox.UpperLeft   = new Vector2(560, 880);

                eventBox.SetParts(naviState.cornerTexture, naviState.wallTexture, naviState.backTexture);

                naviState.pointer.Scale     = new Vector2(0.4f, 0.4f);
                naviState.pointer.UpperLeft = new Vector2((eventBox.frameWidth + eventBox.UpperLeft.X) - naviState.pointer.GetWidth() - 20,
                                                          (eventBox.frameHeight + eventBox.UpperLeft.Y) - naviState.pointer.GetHeight() - 20);
                naviState.pointer.isAlive = false;

                typingStrings       = new TypingStrings();
                typingStrings.lines = new List <string>();
                typingStrings.lines.Add("This is, well. I'm not sure what it is, quite.\n");
                typingStrings.lines.Add("Maybe some sort of altar? I've seen stranger.");
                typingStrings.line          = "";
                typingStrings.previousLines = "";
            }

            if (naviState.Type(typingStrings, gameTime, 0.01))
            {
                Complete(naviState);

                return(true);
            }

            return(false);
        }