コード例 #1
0
ファイル: FallEnvShake.cs プロジェクト: xubingyue/xnamugen
        public override void Run(Combat.Character character)
        {
            Combat.HitDefinition hitdef = character.DefensiveInfo.HitDef;

            if (hitdef.EnvShakeFallTime == 0)
            {
                return;
            }

            Combat.EnvironmentShake envshake = character.Engine.EnvironmentShake;
            envshake.Set(hitdef.EnvShakeFallTime, hitdef.EnvShakeFallFrequency, hitdef.EnvShakeAmplitude, hitdef.EnvShakeFallPhase);

            hitdef.EnvShakeFallTime = 0;
        }
コード例 #2
0
ファイル: EnvShake.cs プロジェクト: xubingyue/xnamugen
        public override void Run(Combat.Character character)
        {
            Int32? time      = EvaluationHelper.AsInt32(character, Time, null);
            Single frequency = Misc.Clamp(EvaluationHelper.AsSingle(character, Frequency, 60), 0, 180);
            Int32  amplitude = EvaluationHelper.AsInt32(character, Amplitude, -4);
            Single phase     = EvaluationHelper.AsSingle(character, PhaseOffset, frequency >= 90 ? 0 : 90);

            if (time == null)
            {
                return;
            }

            Combat.EnvironmentShake envshake = character.Engine.EnvironmentShake;
            envshake.Set(time.Value, frequency, amplitude, phase);
        }