public override void Initialize()
        {
            //print log on screen.
            Root.Add(LoggerManager.Instance.GetLogger("XNALogger") as DrawNode);
            _world = new World(new Vector2(0, -10.0f), EventManager);
            _AIManager = new AIManager();

            EventManager.AddEventType(_AIManager);

            LoadAudition();
            LoadShouldContact();
            LoadRalations();
            LoadTerrain();
            LoadPlayer();
            LoadDecorations();
            LoadBackground();
            LoadEnemies();
            LoadBoss();

            _unitCam = new UnitCamera(_player1, new Vector2(40.0f, 40.0f),
                new Vector2(80.0f, 80.0f),
                new Vector2(-9550, 465),
                new Vector2(9550, -9550),
                new Vector2(190, 190),
                new Vector3(0.0f, 120.0f, 500.0f));

            EventManager.Register(_world);
            EventManager.Register(_unitCam);

            LoadIntro();
        }
Exemplo n.º 2
0
        public override void Initialize()
        {
            _world = new World(new Vector2(0, 0), EventManager);
            //Player1
            var def = XmlHelper.LoadFromFile<CharacterDef>(@"Data\Hua.xml");
            def.ScaleX = 1.3f;
            def.ScaleY = 1.3f;
            def.Width *= 1.3f;
            def.Height *= 1.3f;
            def.SoundEffects = null;
            _player1 = _world.CreateCharacter(def);

            _player1.Sprite.IsVisible = false;
            Root.Add(_player1.Sprite);

            _unitCam = new UnitCamera(_player1, new Vector2(40.0f, 40.0f),
                new Vector2(80.0f, 80.0f),
                new Vector2(-9550, 465),
                new Vector2(9550, -9550),
                new Vector2(190, 190),
                new Vector3(0.0f, 120.0f, 500.0f));
        }