Ejemplo n.º 1
0
        public void Initialize()
        {
            isEndFlag = false;

            characterManager = new CharacterManager();

            // characterManager.Add(new Player(this));
            Player player = new Player(this);

            characterManager.Add(player);

            characterManager.Add(new Enemy(this, new AttackAI(player)));
            //characterManager.Add(new Enemy(this, new BoundAI()));
            //characterManager.Add(new Enemy(this, new BoundAI()));
            //characterManager.Add(new Enemy(this, new RandomAI()));
            //characterManager.Add(new Enemy(this, new RandomAI()));
            //characterManager.Add(new Enemy(this, new RandomAI()));
            characterManager.Add(new Enemy(this, new TraceAI()));

            /*
             * characterManager.Add(new BoundEnemy(this));
             *
             * //10体登録
             * for (int i = 0; i < 10; i++)
             * {
             *  characterManager.Add(new RandomEnemy(this));
             * }
             */

            timer   = new CountDownTimer(10);
            timerUI = new TimerUI(timer);

            score = new Score();
        }
Ejemplo n.º 2
0
        public void Initialize()
        {
            isEndFlag = false;

            //キャラクターマネージャーの実態生成
            characterManager = new CharacterManager();

            //キャラクターマネージャの実態生成
            //   characterManager = new CharacterManager();
            characterManager.Add(new Bag(this));
            //----プレイヤー追加処理----
            //キャラクターマネージャにプレイヤー追加
            for (int i = 0; i < 3; ++i)
            {
                characterManager.Add(new Player(this, i));
            }


            //----エネミー追加処理----
            //動かない敵を追加

            characterManager.Add(new Enemy(this));
            characterManager.Add(new Floor(this));

            //時間関連
            timer = new CountDownTimer(50);

            timerUI = new TimerUI(timer);

            //スコア関連
            score = new Score();

            //プレイヤーの実体生成
            //  player = new Player();
            //プレイヤーを初期化
            //    player.Initialize();

            //Listの実体生成
            //   characters = new List<Character>();

            //ListにCharacterもオブジェクト(継承した子たち)
            //   characters.Add(new Enemy());
            //   characters.Add(new BoundEnemy());
            //10体登録
            //   for (int i = 0; i < 10; i++)
            //   {
            //       characters.Add(new RandomEnemy());
            //   }

            //登録したキャラクターを一気に初期化
            //    foreach (var c in characters)
            //   {
            //         c.Initialize();
            //    }
        }
Ejemplo n.º 3
0
        public void Initialize()
        {
            isEndFlag = false;

            characterManager = new CharacterManager();
            characterManager.Add(new Player(this));
            characterManager.Add(new BoundEnemy(this));

            for (int i = 0; i < 20; i++)
            {
                characterManager.Add(new BoundEnemy(this));
            }


            timer   = new CountUpTimer(1000);
            timerUI = new TimerUI(timer);
            score   = new Score();
        }
Ejemplo n.º 4
0
 public void Initialize()
 {
     moveBlock = new MoveBlock(this, new Vector2(320, 320), 3);
     Device.Camera.Initializa(Vector2.Zero);
     IsEndFlag        = false;
     player           = new Player(this, map2);
     robot            = new Robot(this, map2, 5);
     characterManager = new CharacterManager();
     characterManager.Initialize();
     characterManager.Add(new Player(this, map2));
     characterManager.Add(player);
     characterManager.Add(robot);
     characterManager.Add(moveBlock);
     bullets = new List <Bullet>();
     timer   = new CountDownTimer(30.0f);
     timerUI = new TimerUI(timer);
     map2.Initialize();
 }
Ejemplo n.º 5
0
        public void Initialize()
        {
            IsEndFlag = false;

            Player player = new Player(this);

            characterManager = new CharacterManager();
            characterManager.Initialize();
            characterManager.Add(new Player(this));
            characterManager.Add(new BoundEnemy(this));
            characterManager.Add(new Enemy(this, new BoudAI()));
            characterManager.Add(player);
            characterManager.Add(new Enemy(this, new AttackAI(player)));
            for (int i = 0; i < 10; i++)
            {
                characterManager.Add(new RandomEnemy(this));
            }
            bullets = new List <Bullet>();
            score   = new Score();
            timer   = new CountDownTimer(7);
            timerUI = new TimerUI(timer);
        }
Ejemplo n.º 6
0
        public void Initialize()
        {
            moveBlock = new MoveBlock(this, new Vector2(320, 640), 2);
            Device.Camera.Initializa(Vector2.Zero);
            IsEndFlag = false;

            robot            = new Robot(this, tutorialMap, 5);
            characterManager = new CharacterManager();
            characterManager.Initialize();
            characterManager.Add(new Player(this, tutorialMap));
            characterManager.Add(moveBlock);
            bullets = new List <Bullet>();
            score   = new Score();
            timer   = new CountDownTimer(30);
            timerUI = new TimerUI(timer);
            tutorialMap.Initialize();
            if (player.Isk == false)
            {
                player = new Player(this, tutorialMap);
                characterManager.Add(player);
            }
        }