예제 #1
0
        public PatternInstance(bool correctY, int damage, float timeOffset, float waitTime, float lifeTime, string pattern, string pool, int order, float speedMod, float bulletSize, Waypoint point, Vector2 direction, bool directionToPlayer, WaveModifier rotationPerTick = null, float directionLerp = 0.0f)
        {
            _rotationPerTick = rotationPerTick == null ? WaveModifier.zero : rotationPerTick;

            _directionLerp = directionLerp;

            _correctY   = correctY & !directionToPlayer;
            _damage     = damage;
            _waitTime   = waitTime;
            _timeOffset = timeOffset;

            _lifeTime = lifeTime;

            _patternName = pattern;
            _poolName    = pool;

            _order = order;

            _speedModifier = speedMod;
            _bulletSize    = bulletSize;

            _point = point;

            _direction         = direction;
            _directionToPlayer = directionToPlayer;
        }
예제 #2
0
        public WaveModifier(FadingType smoothing, WaveType type, WaveModifier frequency, WaveModifier amplitude, float phase, float phaseShift)
        {
            _smoothing = smoothing;
            _type      = type;

            _modFrequency = frequency;
            _modAmplitude = amplitude;

            _phase      = phase * Maths.Deg2Rad;
            _phaseShift = phaseShift * Maths.Deg2Rad;
        }
예제 #3
0
        public MoveToPositionAction(float smoothingTime, bool relative, WaveModifier modifierX, WaveModifier modifierY, float duration, bool mustWait) : base(true, mustWait)
        {
            _type = TranslationType.SET;

            _points    = new Waypoint[0];
            _modifiers = new WaveModifier[] { modifierX, modifierY };

            _duration      = duration;
            _smoothingTime = smoothingTime;
            _smooth        = _smoothingTime > 0;
            _relative      = relative;
        }
예제 #4
0
        public WaveModifier(FadingType smoothing, WaveType type, float frequency, float minAmplitude, float maxAmplitude, float phase, float phaseShift)
        {
            _smoothing = smoothing;
            _type      = type;

            _frequency    = frequency;
            _amplitudeMin = minAmplitude;
            _amplitudeMax = maxAmplitude;

            _modFrequency = null;
            _modAmplitude = null;

            _phase      = phase * Maths.Deg2Rad;
            _phaseShift = phaseShift * Maths.Deg2Rad;
        }