Пример #1
0
        private bool CanGiveEffect(Player player, EffectId effect)
        {
            var brick = "brickeffect" + effect.ToString().ToLower();

            switch (effect)
            {
            case EffectId.Fire: brick = "bricklava"; break;

            case EffectId.Run: brick = "brickeffectspeed"; break;
            }

            return(player.HasBrickPack(brick));
        }
Пример #2
0
    public void AddContinousEffect(EffectId effectId, int player = 0, float shake = 0f, int effects = Effects.NONE)
    {
        if (!effectsActive)
        {
            return;
        }

        string key = effectId.ToString() + player.ToString();

        if (!continousEffectList.ContainsKey(key))
        {
            ContinousEffectInfo effect = new ContinousEffectInfo(player, effects, shake, effectId);
            continousEffectList.Add(key, effect);
        }
    }
Пример #3
0
    public void RemoveContinousEffect(EffectId effectId, int player)
    {
        string key = effectId.ToString() + player.ToString();

        continousEffectList.Remove(key);

        //If that was the last effect, stop all effects
        if (temporalEffectList.Count == 0 && continousEffectList.Count == 0)
        {
            finalEffects.Reset();
            mainCameraController.SetEffects(finalEffects);
            entryCameraController.SetEffects(finalEffects);
            godCameraController.SetEffects(finalEffects);
        }
    }
Пример #4
0
 protected virtual string GetEffectName()
 {
     return(_effectId.ToString());
 }
Пример #5
0
 public static string Id2key(this EffectId id)
 {
     return("Effect_" + id.ToString());
 }