Example #1
0
 public TripModifier(TripInfo tripInfo, Vector3 collidedProjectilePosition,
                     Vector3 collidedProjectileVelocity, Entity caster, Entity target,
                     Camera camera, SkillId skillId, Environment environment,
                     CollectionOfInteractions modifierInteractionCollection,
                     WallHitConfig whc, float damageScale) : base(tripInfo, collidedProjectilePosition, collidedProjectileVelocity, caster, target, camera, skillId, environment, modifierInteractionCollection, whc, damageScale)
 {
 }
Example #2
0
        public BlastModifier(BlastInfo info, Entity caster, Entity target,
                             Camera camera, SkillId skillId, Vector3 collidedProjectilePosition,
                             Environment environment,
                             CollectionOfInteractions modifierInteractionCollection,
                             WallHitConfig wallHitConfig, float damageScale) : base(info, caster, target, environment, modifierInteractionCollection)
        {
            this.info    = info;
            this.caster  = caster;
            targetEntity = target;
            this.camera  = camera;
            this.skillId = skillId;
            this.collidedProjectilePosition = collidedProjectilePosition;
            this.environment     = environment;
            this.wallHitConfig   = wallHitConfig;
            this.damageScale     = damageScale;
            this.targetAnimation = target.GetComponent <AnimationComponent>().Animation;
            targetCharacter      = target.GetComponent <SkillComponent>().Character;
            UserInput userInput = target.GetComponent <HeroStateMachineComponent>().UserInput;

            targetDefaultUserInput = (DefaultUserInput)userInput;
            switch (this.info.AnimationProfile)
            {
            case BlastModifierConfig.AnimationProfile.Far:
                animProfile = new FarAnimProfile();
                break;

            case BlastModifierConfig.AnimationProfile.High:
                animProfile = new HighAnimProfile();
                break;

            case BlastModifierConfig.AnimationProfile.Medium:
                animProfile = new MediumAnimProfile();
                break;
            }

            StatsComponent targetStatsComponent = targetEntity.GetComponent <StatsComponent>();
            bool           found;

            extraLyingDurationStats = targetStatsComponent.CharacterStats.FindStats(
                StatsType.ExtraLyingDuration, out found
                );
            if (found)
            {
                lifetime.DynamicExtraDuration += extraLyingDurationStats.BakedFloatValue;
            }
            casterMovementComponent = casterEntity.GetComponent <MovementComponent>();
        }
Example #3
0
        public RagdollModifier(ModifierInfo info, Entity casterEntity, Entity targetEntity,
                               Camera camera, SkillId skillId, Environment environment,
                               CollectionOfInteractions modifierInteractionCollection,
                               WallHitConfig wallHitConfig, float damageScale,
                               ProjectileComponent projectile) : base(info, casterEntity, targetEntity, environment, modifierInteractionCollection)
        {
            this.casterEntity = casterEntity;
            this.targetEntity = targetEntity;
            this.camera       = camera;
            this.skillId      = skillId;
            this.environment  = environment;
            this.whc          = wallHitConfig;
            this.damageScale  = damageScale;
            this.projectile   = projectile;
            this.info         = (RagdollInfo)info;

            easingFunc = EasingFunctions.GetEasingFunction(EasingFunctions.Functions.EaseOutQuad);
            CalculateDurations(this.info);
            switch (this.info.RagdollModifierConfig.ShowAnimationProfile())
            {
            case BlastModifierConfig.AnimationProfile.Far:
                animProfile = new FarAnimProfile();
                break;

            case BlastModifierConfig.AnimationProfile.High:
                animProfile = new HighAnimProfile();
                break;

            case BlastModifierConfig.AnimationProfile.Medium:
                animProfile = new MediumAnimProfile();
                break;
            }
            targetCharacter = targetEntity.GetComponent <SkillComponent>().Character;
            StatsComponent casterStatsComponent = casterEntity.GetComponent <StatsComponent>();

            characterStats = casterStatsComponent.CharacterStats;
            //DLog.Log("RagdollModifier: state: " + state);
        }
Example #4
0
        public KnockdownModifier(KnockdownInfo knockdownInfo, Vector3 collidedProjectilePosition,
                                 Vector3 collidedProjectileVelocity,
                                 Entity caster, Entity target, Camera camera, SkillId skillId,
                                 Environment environment, CollectionOfInteractions modifierInteractionCollection,
                                 WallHitConfig wallHitConfig, float damageScale) : base(knockdownInfo, caster, target, environment, modifierInteractionCollection)
        {
            this.knockdownInfo = knockdownInfo;
            this.collidedProjectilePosition = collidedProjectilePosition;
            this.collidedProjectileVelocity = collidedProjectileVelocity;
            this.caster       = caster;
            this.target       = target;
            this.camera       = camera;
            this.skillId      = skillId;
            this.environment  = environment;
            this.whc          = wallHitConfig;
            this.damageScale  = damageScale;
            movementComponent = target.GetComponent <MovementComponent>();
            targetAnimation   = target.GetComponent <AnimationComponent>().Animation;
            targetCharacter   = target.GetComponent <SkillComponent>().Character;
            UserInput userInput = target.GetComponent <HeroStateMachineComponent>().UserInput;

            targetDefaultUserInput = (DefaultUserInput)userInput;

            StatsComponent targetStatsComponent = targetEntity.GetComponent <StatsComponent>();
            bool           found;

            extraLyingDurationStats = targetStatsComponent.CharacterStats.FindStats(
                StatsType.ExtraLyingDuration, out found
                );
            if (found)
            {
                lifetime.DynamicExtraDuration += extraLyingDurationStats.BakedFloatValue;
            }
            StatsComponent casterStatsComponent = casterEntity.GetComponent <StatsComponent>();

            characterStats          = casterStatsComponent.CharacterStats;
            casterMovementComponent = casterEntity.GetComponent <MovementComponent>();
        }
 public ModifierInfoFactory(CollectionOfInteractions collectionOfInteractions, WallHitConfig whc)
 {
     this.collectionOfInteractions = collectionOfInteractions;
     this.wallHitConfig            = whc;
 }