コード例 #1
0
        public ZombieSpawner(Game game, ZombieManager ZombieManager) : base(game)
        {
            zombieManager = ZombieManager;
            CoolDownTimer = 0;
            SpawnStates   = SpawnStates.SpawnedZombies;

            Random  = new Random();
            Random4 = new Random();
        }
コード例 #2
0
        public BulletManager(Game game, ZombieManager zombieManager) : base(game)
        {
            ZombieManager = zombieManager;
            Controller    = new PlayerController(game);

            Gun         = GunManager.Guns[GunManager.Gun];
            Game1       = game;
            bullets     = new List <Bullets>();
            UsedBullets = new List <Bullets>();

            random = new Random();
        }
コード例 #3
0
ファイル: Game1.cs プロジェクト: CalvinOh/Zombie_Shooter
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            input   = new InputHandler(this);
            console = new GameConsole(this);
            this.Components.Add(console);
            console.Visible = false;
            this.Components.Add(input);

            tower = new Tower(this);
            this.Components.Add(tower);

            player = new Player(this, tower);
            this.Components.Add(player);

            GunManager = new GunManager(this, player);
            this.Components.Add(GunManager);

            Shop = new Shopping(this);
            this.Components.Add(Shop);


            ZombieManager = new ZombieManager(this, tower);
            this.Components.Add(ZombieManager);

            ZombieSpawner = new ZombieSpawner(this, ZombieManager);
            this.Components.Add(ZombieSpawner);

            BulletManager = new BulletManager(this, ZombieManager);
            this.Components.Add(BulletManager);

            score = new ScoreManager(this);
            this.Components.Add(score);
        }