public clsArchitectureBank(ContentManager Content, ref clsSpriteBank Sprites) { Buildings = new clsArchitecture[10]; Mudhuts = new clsArchitecture[10]; Trees = new clsArchitecture[10]; Tower = new clsArchitecture(Sprites.sprTowerPiece[3], Sprites.sprTowerPiece[4]); for (int i = 0; i < Buildings.Length; i++) Buildings[i] = new clsArchitecture(Sprites.sprARC_Body[i], Sprites.sprARC_Head[i]); for (int i = 0; i < Mudhuts.Length; i++) Mudhuts[i] = new clsArchitecture(Sprites.sprARC_Body[10+i], Sprites.sprARC_Head[10+i]); for (int i = 0; i < Trees.Length; i++) Trees[i] = new clsArchitecture(Sprites.sprTree_Body[i], Sprites.sprTree_Head[i]); }
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; }