public bool Collisions(ref clsHUDBank Hud, ref clsChatBoxBank TextMenus, ref clsPlayer Player, int Map, ref clsArchitecture Collider, ref clsBlockingBank Blocks, ref clsNPCBank NPC, ref clsController Controller, ref clsKeyboard KBoard) { HideAll(); SetMap(Map); for (int i = 0; i < Trees.Length; i++) { if (Trees[i].Collide(Player)) { if (Trees[i].Visible) { Collider = Trees[i]; return true; } } } for (int i = 0; i < Buildings.Length; i++) { if (Player.Sprite.Collides(Buildings[i].Body)) { if (Buildings[i].Visible) { Collider = Buildings[i]; return true; } } } for (int i = 0; i < Mudhuts.Length; i++) { if (Player.Sprite.Collides(Mudhuts[i].Body)) { if (Mudhuts[i].Visible) { Collider = Mudhuts[i]; return true; } } } if (Player.Sprite.Collides(Tower.Body)) { if (Tower.Visible) { Collider = Tower; if (Controller.A || KBoard.ACCESS) { if (Player.GetQuest()==0) { if (Player.IsCollected(3)) { { Tower.Body.frame = new Vector2(0, 0); Tower.Head.frame = new Vector2(0, 0); Player.ManipulateScore(150); Player.Collectables = 0; Player.StartQuest(1); TextMenus.RadioMessage.SetText("Great work Jim! Now we can\nfinally get started. First, you\nneed to go to a village just\nnorth of your current location.\nThere is a distinct lack of\neducation in correct water\nsanitation, we have to sort\nthat out.\n\nAdditionally, collect as many\nresources as you can. You\ncan't take on challenges if\nyou don't have resources.\nYou can build resources by\nhelping out the local island\npeople."); Hud.DataBank.SetText(2, "Clean Water in 1st World"); TextMenus.Collectables.Closed(); TextMenus.Databank.ShowIndicator(); Blocks.hVillageblock[0].MakeHidden(); Blocks.hVillageblock[1].MakeHidden(); } } } TextMenus.RadioMessage.ShowIndicator(); } if (!Controller.A && !KBoard.ACCESS) { TextMenus.A.Open(); } return true; } } return false; }
protected override void Initialize() { audioEngine = new AudioEngine(@"Content\MySounds.xgs"); waveBank = new WaveBank(audioEngine, @"Content\Wave Bank.xwb"); soundBank = new SoundBank(audioEngine, @"Content\Sound Bank.xsb"); tmrAnimator = TimeSpan.Zero; Controller = new clsController(); KBoard = new clsKeyboard(); Components.Add(new GamerServicesComponent(this)); base.Initialize(); }