예제 #1
0
 public EffectMessage(Effect Effect)
     : base(MessageTypeGameMode.Effect)
 {         
     this.Effect = Effect;                       
 }
예제 #2
0
        /// <summary>
        /// Handles a new effect information into the current state.
        /// </summary>
        /// <param name="Effect"></param>
        public void HandleEffect(Effect Effect)
        {
            switch (Effect.EffectType)
            {
                case EffectType.Invert:         // 1
                    invert.StartOrExtend(((DurationEffect)Effect).Duration);
                    break;

                case EffectType.Shake:          // 2
                    //shake.StartOrExtend(((DurationEffect)Effect).Duration);
                    break;

                case EffectType.Paralyze:       // 3
                    paralyze.IsActive = true;
                    break;

                case EffectType.Release:        // 4
                    paralyze.IsActive = false;
                    break;

                case EffectType.Blind:          // 5
                    blind.IsActive = true;
                    break;

                case EffectType.See:            // 6
                    blind.IsActive = false;
                    break;

                case EffectType.Pain:           // 7
                    pain.StartOrExtend(((DurationEffect)Effect).Duration);                    
                    break;

                case EffectType.Blur:           // 8
                    blur.StartOrExtend(((DurationEffect)Effect).Duration);
                    break;

                case EffectType.Raining:        // 9
                    raining.IsActive = true;
                    break;

                case EffectType.Snowing:        // 10
                    snowing.IsActive = true;
                    break;

                case EffectType.ClearWeather:   // 11
                    snowing.IsActive = false;
                    raining.IsActive = false;
                    break;

                case EffectType.Sand:           // 12
                    sand.IsActive = true;
                    break;

                case EffectType.ClearSand:      // 13
                    sand.IsActive = false;
                    break;

                case EffectType.Waver:          // 14
                    //waver.StartOrExtend(((DurationEffect)Effect).Duration);
                    break;

                case EffectType.FlashXLat:      // 15
                    flashxlat.XLat = ((EffectFlashXLat)Effect).XLat;
                    flashxlat.StartOrExtend(((DurationEffect)Effect).Duration);
                    break;

                case EffectType.WhiteOut:       // 16
                    whiteout.StartOrExtend(((DurationEffect)Effect).Duration);
                    break;

                case EffectType.XLatOverride:   // 17
                    // TODO?
                    break;
            }
        }