コード例 #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>();
        }