Пример #1
0
 public UIPlayer(string name, CharacterClass characterClass)
     : base(name, characterClass)
 {
     playerControl = null;
 }
Пример #2
0
 public UIPlayer(PlayerControlLayer control, string name, CharacterClass characterClass)
     : base(name, characterClass)
 {
 }
Пример #3
0
        private void InitView(Device device)
        {
            worldLoaded = true;

            //meshWithWeapon = ResourceCache.Instance.GetRenderingData("handWithCrossbow.x");
            //slay = new SteeringLayer(player);

            gameController.Init();
            playerInfoLayer = new PlayerControlLayer(player, gameController);
            playerInfoLayer.RenderCrosshair = false;
            player.PlayerControl = playerInfoLayer;
            GM.AppWindow.PushLayer(playerInfoLayer);
            GM.AppWindow.PushLayer(new BeginGameLayer(player, gameController));

            this.renderer = new Renderer(device);
            renderer.LoadData();

            World.Instance.OnGrenadeHit += new GrenadeEventHandler(Instance_OnGrenadeHit);

            //ParticleEmitter em = new EngineEmitter(renderer.ParticleSystem);
            //em.Position = new MyVector(0, 0, 100);
            //renderer.ParticleSystem.AddEmitter(em);

            GM.AppWindow.AddKeyLock(KeyMapping.Default.Jump);
            GM.AppWindow.AddKeyLock(KeyMapping.Default.NextWeapon);
            GM.AppWindow.AddKeyLock(KeyMapping.Default.PreviousWeapon);
        }