示例#1
0
文件: Snake.cs 项目: neveza/SnakeGame
        public Snake(TextureGenerator TextureGen, int Width, int Height)
        {
            _Texture      = TextureGen.CreateTexture(Width, Height, Color.White);
            _EmptyTexture = TextureGen.CreateTexture(Width, Height, Color.Transparent);


            segmentsDictionary = new Dictionary <string, SnakeSegment>();

            segmentsDictionary.Add("Head", createSegment(_Texture, new Vector2(5, 5), Color.Red));
        }
示例#2
0
        public Food(Random Random, TextureGenerator TextureGen, int Width, int Height)
        {
            _Texture = TextureGen.CreateTexture(Width, Height, Color.White);

            random = Random;
        }
示例#3
0
        public Walls(TextureGenerator TextureGen, int Width, int Height)
        {
            _Texture = TextureGen.CreateTexture(Width, Height, Color.White);

            WallDictionary = new Dictionary <string, List <WallBlock> >();
        }