コード例 #1
0
ファイル: GameState.cs プロジェクト: AreonDev/NoWayOut
 /// <summary>
 /// Initializes a new instance of the <see cref="FreezingArcher.Content.GameState"/> class.
 /// </summary>
 /// <param name="name">Name.</param>
 /// <param name="env">Environment.</param>
 /// <param name="messageProvider">Message Manager.</param>
 public GameState(string name, Environment env, MessageProvider messageProvider)
 {
     Name = name;
     Environment = env;
     MessageProxy = new MessageProxy(messageProvider);
     PhysicsManager = new PhysicsManager(messageProvider);
 }
コード例 #2
0
ファイル: Maze.cs プロジェクト: AreonDev/NoWayOut
 /// <summary>
 /// Initializes a new instance of the Maze<TTheme> class.
 /// </summary>
 /// <param name="objmnr">Object manager.</param>
 /// <param name="seed">Seed.</param>
 /// <param name="sizeX">Size x.</param>
 /// <param name="sizeY">Size y.</param>
 /// <param name="scale">Scale.</param>
 /// <param name="physics">The physics instance the maze should register to.</param>
 /// <param name="initFunc">Init func.</param>
 /// <param name="generateFunc">Generate func.</param>
 /// <param name="addToSceneDelegate">Add to scene delegate.</param>
 /// <param name="exitFunc">Calculate path to exit function.</param>
 /// <param name="placeFeaturesFunc">Spawn portals function.</param>
 /// <param name="turbulence">Turbulence.</param>
 /// <param name="maximumContinuousPathLength">Maximum continuous path length.</param>
 /// <param name="portalSpawnFactor">Portal spawn factor.</param>
 internal Maze (ObjectManager objmnr, MessageProvider messageProvider, AudioManager am, int seed, int sizeX, int sizeY,
     float scale, PhysicsManager physics, IMazeTheme theme, InitializeMazeDelegate initFunc,
     GenerateMazeDelegate generateFunc, AddMazeToGameStateDelegate addToSceneDelegate,
     CalculatePathToExitDelegate exitFunc, PlaceFeaturesDelegate placeFeaturesFunc, double turbulence,
     int maximumContinuousPathLength, uint portalSpawnFactor)
 {
     objectManager = objmnr;
     Seed = seed;
     Size = new Vector2i(sizeX, sizeY);
     this.Scale = scale;
     Turbulence = turbulence;
     PortalSpawnFactor = portalSpawnFactor;
     MaximumContinuousPathLength = maximumContinuousPathLength;
     rand = new FastRandom (seed);
     initMazeDelegate = initFunc;
     generateMazeDelegate = generateFunc;
     addMazeToGameStateDelegate = addToSceneDelegate;
     calcExitPathDelegate = exitFunc;
     placeFeaturesDelegate = placeFeaturesFunc;
     this.physics = physics;
     this.audio = am;
     this.messageProvider = messageProvider;
     HasFinished = false;
     this.theme = theme;
 }