/*
* StellarProspectorGameScreen.cs
* Authors: Mike DeMauro, Brian Murphy
* Copyright (c) 2007-2008 Cornell University
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using tAC_Engine.Graphics.Cameras;
using tAC_Engine.Graphics.Entities;
using TACParticleEngine;
using Util;
using Random = Util.Random;
using tAC_Engine.GUI;
namespace StellarProspector
{
///
/// Phases of StellarProspector
///
public enum Phases
{
///
/// First phase: Central and peripheral stimulus without distractors or sound cues for
/// whenever the early detection cue changes
///
One,
///
/// Second phase: Central and peripheral stimulus with distractors nut no sound cues for
/// whenever the early detection cue changes
///
Two,
///
/// Third phase: Central and peripheral stimulus with distractors and sound cues for
/// whenever the early detection cue changes
///
Three,
///
/// The tutorial mode
///
Tutorial
}
///
/// This is the main type for your game
///
public class StellarProspectorGameScreen : GameScreen
{
#region Constants
// Constant for the amount of desired frames per second
private const int FRAMES_PER_SECOND = 60;
// Constant for the width of the sector frame
private const int SECTOR_FRAME_WIDTH = 323;
// Constant for the height of the sector frame
private const int SECTOR_FRAME_HEIGHT = 284;
// Constant for the number of sector frames
private const int NUM_SECTOR_FRAMES = 5;
// Constant for the radius of the inner semi-circle area
private const int INNER_RADIUS = 110;
// Constant for the number of flickering sectors in the outer areas
private const int NUM_SECTORS = 4;
// Constant for how fast the energy corrodes while the central stimulus is active
private const float CORRODE_SPEED = 0.3f;
// Constant for how long it takes before another response can be accepted after any response input
private const float COOLDOWN_TIME = 1f;
// Constant for how long it takes for the drain to reoccur during the tutorial
private const float DRAIN_DELAY = 0.01f;
// Constant for the number of kinds of distractors
private const int NUM_OF_DISTRACTORS = 4;
// Constant value for the amount of the max progress needed to get to phase 2
internal const float PHASE_TWO_PERCENT = 0.33f;
// Constant value for the amount of the max progress needed to get to phase 3
internal const float PHASE_THREE_PERCENT = 0.66f;
#endregion
#region Fields
// General mini game objects
private Logger mLogger;
private InputHandler inputHandler;
// Dialog objects
private readonly List