Exemple #1
0
        public PlayerClient(CreateObjectPacket createPacket) :
            base(createPacket, Constants.PlayerModel)
        {
            FlameThrower = new FlameThrowerParticleSystem(Tool.Thrower.ConeAngle * 10f, 40.0f, 15.0f, Tool.Thrower.Range / 2.0f, 1.0f, Tool.Thrower.Range, 1.0f);
            LeafBlower   = new LeafBlowerParticleSystem();
            Suction      = new InverseParticleSystem(Constants.WindTexture, Vector3.Zero, -Vector3.UnitX * SUCTION_SPEED, true);
            GraphicsManager.ParticleSystems.Add(FlameThrower);
            GraphicsManager.ParticleSystems.Add(LeafBlower);
            GraphicsManager.ParticleSystems.Add(Suction);
            FlameThrower.EnableGeneration(false);
            LeafBlower.EnableGeneration(false);
            Suction.EnableGeneration(false);

            _audioFootstep = AudioManager.GetNewSource();
            _audioFlame    = AudioManager.GetNewSource();
            _audioWind     = AudioManager.GetNewSource();
            _audioSuction  = AudioManager.GetNewSource();
            _audioVoice    = AudioManager.GetNewSource();

            // Create new animations
            float scale     = .07f;
            float timeScale = 3f;

            _animWalkBlower  = AnimationManager.AddAnimation(Constants.PlayerWalkBlowerAnim, new Vector3(scale), timeScale);
            _animWalkThrower = AnimationManager.AddAnimation(Constants.PlayerWalkThrowerAnim, new Vector3(scale), timeScale);
            _animIdle        = AnimationManager.AddAnimation(Constants.PlayerIdleAnim, new Vector3(scale), timeScale);
            _animVictory     = AnimationManager.AddAnimation(Constants.PlayerVictoryAnim, new Vector3(scale), timeScale);
            _animLose        = AnimationManager.AddAnimation(Constants.PlayerDefeatAnim, new Vector3(scale), timeScale);

            // set to idle animation by default
            SwitchAnimation(_animIdle);
            nicknameUI = new UINickname(this, Name);

            Burnable = true;
        }
Exemple #2
0
 public static void DrawParticlesThisFrame(NormalParticleSystem p, Transform t)
 {
     DrawThisFrame.Add(new KeyValuePair <NormalParticleSystem, Transform>(p, t));
 }