/******************************************************************************/ /*! \file IEvent.cs \author Kevin Carey Event interface Copyright © 2007 DigiPen(USA) Corporation. All rights reserved. */ /******************************************************************************/ #region Using Statements using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; #endregion namespace Shooting_Range { // IEvent interface // Interface for a game logic event. An event is defined by one set of targets that // are spawned and to be shot until some condition is met where in a new set should // be spawned interface IEvent { // Init function // Called when an event is started void Init(int round); // Update function // Called every frame when an event is active void Update(TimeSpan deltaTime); // HandleCollision function // What to do when a collision happens while this event happens void HandleCollision(Object bullet, Object obj); // Shutdown function // Called when the event is going to end void Shutdown(); // End function // Function to say when the event should be ended bool End(); // Fail function // Function to say when a player has hit a "wrong" target // Shoud return false if failure is not possible bool Fail(); // ResetFail function // Function to recover from a failure. Should contain the following code if a failure is possible: // m_Fail = false; void ResetFail(); // IsActive // True when the counter is ticking down (and instructions are active), false otherwise bool IsActive { get; } // Timer // Each event should have a timer to help determine game logic TimeSpan Timer { get; } } }