public FotograafHud(GameWorld owner) : base(owner) { Visible = false; NumScreenshots = 0; ScreenShots = new ScreenShot[5]; }
public Wallpaper(GameWorld game) : base(game) { Texture = Content.Load<Texture2D>("Fotograaf/Images/livingroom"); _wallpaperViewPort = new Rectangle(); _deadZoneDelaycounter = 0; }
public TrophyScreen(GameWorld game) : base(game, false) { _game = game.Game; _graphicsDevice = game.GraphicsDevice; Initialize(); }
public PaintBrush(GameWorld game) : base(game) { Texture = Content.Load<Texture2D>("schilder/images/brush"); _sourceRect = new Rectangle(0, 0, Texture.Width, Texture.Height); // This class gets drawn via Kantoor3D not via Schilder. Visible = false; }
public Piece(GameWorld owner, int id, int x, int y) : base(owner) { _x = x; _y = y; _id = id; _image = id + 1; Texture = Content.Load<Texture2D>("Uitnodiging/SheepScape/sheepscape_" + ((_image < 10) ? "0" : "") + _image); }
public Flash(GameWorld owner) : base(owner) { Texture = Content.Load<Texture2D>("Fotograaf/Images/flash"); _color = new Color(225,225,225, 225); _viewPort = new Rectangle(); _flashTimer = 0; _isFadingToVisible = false; Visible = true; }
public Cat(GameWorld owner) : base(owner) { Texture = Content.Load<Texture2D>("Fotograaf/Images/catspritesheet"); _viewPortSprite = new Rectangle(0, 0, _stepSizeSprite, Texture.Height); _stepTimer = 0; _walkToIndex = 1; // NB.: we start with 1, as 0 is the spawn location. LoadWaypoints(); Position = Waypoints[0].Position; // Spawn on the first waypoint. }
public Camera(GameWorld owner) : base(owner) { Texture = Content.Load<Texture2D>("Fotograaf/Images/camera"); Position = Vector2.Zero; Visible = false; _lastZoomAction = 0; _screenshotStream = new ScreenShot(); // The gulden snede, coords are relative to the LCD screen center. _guldenCoords = new Vector2[4]; _guldenCoords[0] = new Vector2(-40, -20); // Left top _guldenCoords[1] = new Vector2( 40, -20); // Right top _guldenCoords[2] = new Vector2( 40, 20); // Right bottom _guldenCoords[3] = new Vector2(-40, 20); // Left bottom }
public GameObject(GameWorld owner, bool visible = true) { Visible = visible; _owner = owner; }
public FPSCounter(GameWorld game) : base(game) { Position = Vector2.Zero; Color = Color.Black; }
public Wallpaper(GameWorld game) : base(game) { Texture = Content.Load<Texture2D>("Schilder/Images/muur voor kantoor"); _monitorViewPort = new Rectangle(); }
public PuzzleImage(GameWorld owner) : base(owner, false) { Texture = Content.Load<Texture2D>("Uitnodiging/Sheepscape/sheepscapeDull"); }
// Call this to "close" the current mini-game and return the camera to the origin. public void UnloadMiniGame() { Narrator.PlacementOffset = Vector2.Zero; if (CurrentMiniGame == null) return; MediaPlayer.Stop(); Camera.ReturnFromLastGameObject(); Narrator.Hide(); Narrator.RemoveAllButtons(); CurrentMiniGame.CleanUp(); CurrentMiniGame = null; ResetMouse(); // Mini-game "de schilder" hides the actual easel, so we must show it again! GetGameObject3D("schildersezel").Visible = true; GetGameObject3D("globe").Visible = true; GetGameObject3D("puzzeldoos").Visible = true; GetGameObject3D("boekenkast").Visible = true; GetGameObject3D("laptop").Visible = true; GetGameObject3D("memoryTableObject").Visible = true; Narrator.Instance.HideDolphin = false; // Return the input back to the office: CurrentGameState = GameStates.KANTOOR; AudioFactory.PlayOnce("kantoortheme", true); }
// Loads a minigame within the Kantoor3D environment. public void LoadMiniGame(GameObject3D gameObject) { // Update the gamestate and have the "input" to the minigame rather than office. if (gameObject != null && gameObject.MiniGameType != MiniGames.NONE && Camera.PlayerControllable) { Narrator.Hide(); switch (gameObject.MiniGameType) { case MiniGames.ONTWERPEN: _tempWorld = new Ontwerpen.Ontwerpen(_owner); break; case MiniGames.FOTOGRAAF: _tempWorld = new Fotograaf.Fotograaf(_owner); break; case MiniGames.SCHILDER: // Hide the easel as this minigame will draw his own easel. _tempWorld = new Schilder.Schilder(_owner); break; case MiniGames.UITNODIGING: _tempWorld = new Uitnodiging.Uitnodiging(_owner); break; case MiniGames.MENU: _tempWorld = new Menu.Menu(_owner); break; case MiniGames.NONE: default: // The selection object has no minigame mapped to it. break; } Camera.MoveToGameObject(gameObject, 1000); } }
void Camera_CameraArrived(GameObject3D gameObject, bool isMovingToOrigin) { if (!isMovingToOrigin) { CurrentMiniGame = _tempWorld; CurrentGameState = GameStates.MINIGAME; if (CurrentMiniGame is Schilder.Schilder) { GetGameObject3D("schildersezel").Visible = false; GetGameObject3D("boekenkast").Visible = false; } if (CurrentMiniGame is Uitnodiging.Uitnodiging) { GetGameObject3D("puzzeldoos").Visible = false; GetGameObject3D("laptop").Visible = false; } if (CurrentMiniGame is Ontwerpen.Ontwerpen) { GetGameObject3D("globe").Visible = false; GetGameObject3D("memoryTableObject").Visible = false; } // A sepearte function call is required as some GameWorld instances call the Initialize themselfs. if (CurrentMiniGame != null) { CurrentMiniGame.OnCameraArrive(); } if (gameObject.MiniGameType == MiniGames.AFLEVERING) { Narrator.Hide(); Narrator.RemoveAllButtons(); AudioFactory.PlayOnce("door"); if (CurrentMiniGame != null) { CurrentMiniGame.CleanUp(); CurrentMiniGame = null; } Aflevering = new Aflevering.Aflevering(Game); Aflevering.Initialize(); DrawWorld = false; CurrentGameState = GameStates.AFLEVERING; Narrator.Instance.Hide(); Narrator.Instance.HideDolphin = true; } } else { PlayerObject.Position = Camera.Position; Game.IsMouseVisible = true; if (lastLoadAfter != MiniGames.NONE) { //load minigame switch (lastLoadAfter) { case MiniGames.AFLEVERING: Camera.MoveToGameObject(GetGameObject3D("deur"), 1000.0f); break; case MiniGames.FOTOGRAAF: LoadMiniGame(GetGameObject3D("tafelfotograaf")); break; case MiniGames.ONTWERPEN: LoadMiniGame(GetGameObject3D("tafelontwerpen")); break; case MiniGames.SCHILDER: LoadMiniGame(GetGameObject3D("schildersezel")); break; case MiniGames.UITNODIGING: LoadMiniGame(GetGameObject3D("tafeluitnodiging")); break; } lastLoadAfter = MiniGames.NONE; } } }