- Main Page
- Classes
- Files

- File List

# C:/Users/Andreas Schiffler/Desktop/SVN/NewGamePhysics/PendulumGame/PendulumGameState.cs

    00001 ﻿//-----------------------------------------------------------------------------
    00002 // PendulumGameState.cs
    00003 // (A. Schiffler, 2009)
    00004 //-----------------------------------------------------------------------------
    00005
    00006 namespace PendulumGame
    00007 {
    00008     using System;
    00009     using Microsoft.Xna.Framework;
    00010     using NewGamePhysics.Physics;
    00011     using NewGamePhysics.PhysicalElements;
    00012     using NewGamePhysics.Networking;
    00013
    00018     public class PendulumGameState
    00019     {
    00023         public const int NumPlayers = 2;
    00024
    00028         private GamePlayer[] players =
    00029             new GamePlayer[NumPlayers];
    00030
    00034         private CelestialObject currentCelestialObject =
    00035             CelestialObject.Earth;
    00036
    00040         private EarthGravityModel currentEarthGravityModel =
    00041             EarthGravityModel.GfcGrid;
    00042
    00046         private MarsGravityModel currentMarsGravityModel =
    00047             MarsGravityModel.Normal;
    00048
    00052         private int currentTextureVariation = 0;
    00053
    00057         private double currentGravity = 9.81;
    00058
    00062         private RotationalFrictionType currentRotationalFrictionType =
    00063             RotationalFrictionType.Stribeck;
    00064
    00068         private PhysicalRandomNumberGenerator physicalRandomNumberGenerator;
    00069
    00073         private int submittedEntropyBits;
    00074
    00078         private bool useOnlyOneGamepad;
    00079
    00083         private bool disablePixelShaderEffects;
    00084
    00088         private bool realtimeAudioOnDemand;
    00089
    00093         private EntropySourceType currentEntropySourceType;
    00094
    00098         private Vector2 scale;
    00099
    00103         public PendulumGameState()
    00104         {
    00105             this.physicalRandomNumberGenerator =
    00106                 new PhysicalRandomNumberGenerator(
    00107                     EntropySourceType.PlayTrulyRandom,
    00108                     PendulumGame.PlayTrulyRandomAgentName);
    00109         }
    00110
    00114         public Vector2 Scale
    00115         {
    00116             get { return this.scale; }
    00117             set { this.scale = value;  }
    00118         }
    00119
    00123         public CelestialObject CurrentCelestialObject
    00124         {
    00125             get { return this.currentCelestialObject; }
    00126             set { this.currentCelestialObject = value; }
    00127         }
    00128
    00132         public EarthGravityModel CurrentEarthGravityModel
    00133         {
    00134             get { return this.currentEarthGravityModel; }
    00135             set { this.currentEarthGravityModel = value; }
    00136         }
    00137
    00141         public MarsGravityModel CurrentMarsGravityModel
    00142         {
    00143             get { return this.currentMarsGravityModel; }
    00144             set { this.currentMarsGravityModel = value; }
    00145         }
    00146
    00150         public int CurrentTextureVariation
    00151         {
    00152             get { return this.currentTextureVariation; }
    00153             set { this.currentTextureVariation = value; }
    00154         }
    00155
    00159         public RotationalFrictionType CurrentRotationalFrictionType
    00160         {
    00161             get { return this.currentRotationalFrictionType; }
    00162             set { this.currentRotationalFrictionType = value; }
    00163         }
    00164
    00168         public EntropySourceType CurrentEntropySourceType
    00169         {
    00170             get { return this.currentEntropySourceType; }
    00171             set { this.currentEntropySourceType = value; }
    00172         }
    00173
    00177         public double CurrentGravity
    00178         {
    00179             get { return this.currentGravity; }
    00180             set { this.currentGravity = value; }
    00181         }
    00182
    00186         public PhysicalRandomNumberGenerator PhysicalRandomNumberGenerator
    00187         {
    00188             get { return this.physicalRandomNumberGenerator; }
    00189             set { this.physicalRandomNumberGenerator = value; }
    00190         }
    00191
    00195         public int SubmittedEntropyBits
    00196         {
    00197             get { return this.submittedEntropyBits; }
    00198             set { this.submittedEntropyBits = value; }
    00199         }
    00200
    00204         public bool UseOnlyOneGamepad
    00205         {
    00206             get { return this.useOnlyOneGamepad; }
    00207             set { this.useOnlyOneGamepad = value; }
    00208         }
    00209
    00214         public bool RealtimeAudioOnDemand
    00215         {
    00216             get { return this.realtimeAudioOnDemand; }
    00217             set { this.realtimeAudioOnDemand = value; }
    00218         }
    00219
    00224         public bool DisablePixelShaderEffects
    00225         {
    00226             get { return this.disablePixelShaderEffects; }
    00227             set { this.disablePixelShaderEffects = value; }
    00228         }
    00229
    00233         public GamePlayer[] Players
    00234         {
    00235             get { return this.players; }
    00236         }
    00237     }
    00238 }