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); } }
internal virtual void Idle(NaviState naviState, GameTime gameTime) { if (naviState.Type(typingStrings, gameTime, 0.01)) { Complete(naviState); } }
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 = ""; } } }
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); }