Пример #1
0
            public FlamethrowerFactory(StandardSpellProperties standardSpellProperties, float spreadAngle, float damagePerSecond, float duration)
            {
                this.standardSpellProperties = standardSpellProperties;
                this.spreadAngle             = spreadAngle;
                this.damagePerSecond         = damagePerSecond;
                this.duration = duration;

                flameObject            = LoadObject <Projectiles.Projectile>("Flame");
                flameDamageProbeObject = LoadObject <Projectiles.Projectile>("FlameDamageProbe");
            }
Пример #2
0
        public override void Fire(Weapon weapon, Character caster)
        {
            base.Fire(weapon, caster);

            flame = Object.Instantiate(flameObject);

            flame.transform.parent        = weapon.weaponTip.transform;
            flame.transform.localPosition = Vector3.forward;
            flame.transform.localRotation = Quaternion.identity;

            isCasting = true;
            flame.StartCoroutine(EmitDamageProbes(weapon));
        }
Пример #3
0
        public Flamethrower(StandardSpellProperties standardSpellProperties, Projectiles.Projectile flameObject,
                            Projectiles.Projectile flameDamageProbeObject, float spreadAngle, float damagePerSecond,
                            float duration)
            : base(standardSpellProperties)
        {
            this.flameObject            = flameObject;
            this.flameDamageProbeObject = flameDamageProbeObject;
            this.spreadAngle            = spreadAngle;
            this.damagePerSecond        = damagePerSecond;
            this.duration = duration;

            isCasting = false;
        }
Пример #4
0
 private void OnEndOfProbeLifetime(Projectiles.Projectile projectile)
 {
     Object.Destroy(projectile.gameObject);
 }
Пример #5
0
 private void OnBurn(Projectiles.Projectile projectile, Collision collision, bool hasCollidedBefore)
 {
     Object.Destroy(projectile.gameObject);
 }