Ejemplo n.º 1
0
        void OnCastSpell(SpellCastEventData e)
        {
            //TODO: this should be refactored. I am tired.
            switch (e.Type)
            {
            case SpellTypes.ManMega_RocketRampage: PlaySound(Sounds.ManMega_1, e.Position); break;

            case SpellTypes.ManMega_Slash: PlaySound(Sounds.ManMega_2, e.Position); break;

            case SpellTypes.ManMega_HintOfASpark: PlaySound(Sounds.ManMega_3, e.Position); break;

            case SpellTypes.ManMega_Shotgun: PlaySound(Sounds.ManMega_4, e.Position); break;

            case SpellTypes.Zoro_Tooth: PlaySound(Sounds.Zero_1, e.Position); break;

            case SpellTypes.Zoro_Slash: PlaySound(Sounds.Zero_2, e.Position); break;

            case SpellTypes.Zoro_Double: PlaySound(Sounds.Zero_3, e.Position); break;

            case SpellTypes.Zoro_Wall: PlaySound(Sounds.Zero_4, e.Position); break;
            }

            var s = GetSpellFromType(new ClientLinearSpell(e.ID, e.Type, e.Position, e.Time, e.Velocity, e.Range, e.Width));

            Spells.Add(e.ID, s);
            GameWorld.AddChild(s);

            if (OurChampion != null && OurChampion.Champion.ID == e.OwnerID)
            {
                ChampionState.SetSpellCooldown(e.Type, e.Cooldown);
            }
        }
Ejemplo n.º 2
0
		void OnCastSpell(SpellCastEventData e)
		{
			//TODO: this should be refactored. I am tired.
			switch (e.Type) {
				case SpellTypes.ManMega_RocketRampage: PlaySound(Sounds.ManMega_1, e.Position); break;
				case SpellTypes.ManMega_Slash: PlaySound(Sounds.ManMega_2, e.Position); break;
				case SpellTypes.ManMega_HintOfASpark: PlaySound(Sounds.ManMega_3, e.Position); break;
				case SpellTypes.ManMega_Shotgun: PlaySound(Sounds.ManMega_4, e.Position); break;

				case SpellTypes.Zoro_Tooth: PlaySound(Sounds.Zero_1, e.Position); break;
				case SpellTypes.Zoro_Slash: PlaySound(Sounds.Zero_2, e.Position); break;
				case SpellTypes.Zoro_Double: PlaySound(Sounds.Zero_3, e.Position); break;
				case SpellTypes.Zoro_Wall: PlaySound(Sounds.Zero_4, e.Position); break;
			}

			var s = GetSpellFromType(new ClientLinearSpell(e.ID, e.Type, e.Position, e.Time, e.Velocity, e.Range, e.Width));
			Spells.Add(e.ID, s);
			GameWorld.AddChild(s);

			if (OurChampion != null && OurChampion.Champion.ID == e.OwnerID) {
				ChampionState.SetSpellCooldown(e.Type, e.Cooldown);
			}
		}