예제 #1
0
파일: GatherZone.cs 프로젝트: er1/c376p1
        public GatherZone(ResourceManager _rm, Game1 _game)
        {
            game = _game;
            manager = _rm;

            gatherers = new List<Gatherer>();
            minerals = new List<Mineral>();
            gatherersAddQueue = new List<Gatherer>();
            mineralsAddQueue = new List<Mineral>();
            gatherersDeleteQueue = new List<Gatherer>();
            mineralsDeleteQueue = new List<Mineral>();

            //minerals
            for (int i = 0; i < 400; ++i)
            {
                Vector3 p = new Vector3(250, 8, 0);
                p += new Vector3((float)rand.NextDouble(), 0.5f, (float)rand.NextDouble()) * 200f - Vector3.One * 80f;

                Mineral m = new Mineral(this, p);

                add(m);
            }
            //gatherers
            for (int i = 0; i < 10; ++i)
            {
                Gatherer g = new Gatherer(this, new Vector3(100, 8, -40 + 8 * i));

                g.targetPosition = new Vector3(250, 8, 0);

                add(g);
            }

            updateLists();
        }
예제 #2
0
파일: Program.cs 프로젝트: er1/c376p1
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
예제 #3
0
파일: monster.cs 프로젝트: er1/c376p1
        public monster(ref Model temp, Vector3 location, Vector3 newDirection, Game1 _game)
            : base(temp)
        {
            game = _game;

            direction = newDirection;
            initialDirection = newDirection;
            world = Matrix.CreateRotationY((float)Math.PI/2) * Matrix.CreateTranslation(location);
            //world = Matrix.CreateTranslation(direction);

            hitColony = false;
            //life = 100;
        }
예제 #4
0
파일: monster2.cs 프로젝트: er1/c376p1
 public monster2(ref Model temp, Vector3 location, Vector3 newDirection, Game1 _game)
     : base(ref temp, location, newDirection, _game)
 {
     type = 2;
     life = 200;
 }