Exemple #1
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>();
        }
Exemple #2
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>();
        }