示例#1
0
文件: Player.cs 项目: Cendrb/Arman
 public Player(Arman game, PositionInGrid positionInGrid, Texture2D texture, Block[,] gameArray, int oneBlockSize, int timeForMove, List<Entity> movableObjects, GameArea gameArea, Controls controls)
     : base(game, positionInGrid, texture, gameArray, oneBlockSize, timeForMove, movableObjects)
 {
     this.gameArea = gameArea;
     this.controls = controls;
     spawnPoint = positionInGrid;
 }
示例#2
0
文件: Program.cs 项目: Cendrb/Arman
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Arman game = new Arman())
     {
         game.Run();
     }
 }
示例#3
0
文件: Block.cs 项目: Cendrb/Arman
 public Block(Arman game, BlockType type, PositionInGrid position, int oneBlockSize)
     : base(game)
 {
     this.game = game;
     Type = type;
     Position = position;
     this.oneBlockSize = oneBlockSize;
 }
示例#4
0
文件: GameArea.cs 项目: Cendrb/Arman
        public GameArea(Arman game)
            : base(game)
        {
            this.game = game;

            gameSpeed = 10;
            blockSize = 20;
            entities = new List<Entity>();
            won = false;
            gameTargets = new List<GameTarget>();
        }
示例#5
0
文件: Entity.cs 项目: Cendrb/Arman
 public Entity(Arman game, PositionInGrid positionInGrid, Texture2D texture, Block[,] gameArray, int oneBlockSize, int timeForMove, List<Entity> movableObjects)
 {
     Blocked = false;
     this.game = game;
     PositionInGrid = positionInGrid;
     this.Texture = texture;
     this.gameArray = gameArray;
     isMoving = false;
     this.timeForMove = timeForMove;
     this.oneBlockSize = oneBlockSize;
     this.movableObjects = movableObjects;
     movingDifference = 0.0F;
     movingDirection = Direction.up;
 }
示例#6
0
文件: Mob.cs 项目: Cendrb/Arman
        public Mob(Arman game, PositionInGrid positionInGrid, Texture2D texture, Block[,] gameArray, int oneBlockSize, int timeForMove, List<Entity> entities, int range, int aditionalTimeForMove, int movingFrequency)
            : base(game, positionInGrid, texture, gameArray, oneBlockSize, timeForMove, entities)
        {
            players = from entity in entities
                      where entity is Player
                      select (Player)entity;
            mobs = from entity in entities
                   where entity is Mob
                   select (Mob)entity;

            this.movingFrequency = movingFrequency;

            Range = range;

            this.timeForMove += aditionalTimeForMove;
        }
示例#7
0
文件: Detector.cs 项目: Cendrb/Arman
 public Detector(Arman game, BlockType type, PositionInGrid position, int oneBlockSize, DetectorActivated detectorActivated)
     : base(game, type, position, oneBlockSize)
 {
     this.detectorActivated = detectorActivated;
     alreadyActivated = false;
 }
示例#8
0
 public MovableBlock(Arman game, PositionInGrid positionInGrid, Texture2D texture, Block[,] gameArray, int oneBlockSize, int timeForMove, List<Entity> movableObjects)
     : base(game, positionInGrid, texture, gameArray, oneBlockSize, timeForMove, movableObjects)
 {
 }