public override void OnEnter() { base.OnEnter(); this.passive = this.gameObject.GetComponent <WispPassiveController>(); this.skin = this.characterBody.skinIndex; WispPassiveController.ChargeState state = this.passive.UseCharge(FireGaze.chargeUsed, FireGaze.chargeScaler); this.radius *= state.chargeScaler; this.GetComponent <WispFlareController>().intensity = 0.5f; }
private void FireOrb() { if (this.hasFired) { return; } WispPassiveController.ChargeState chargeState = this.passive.UseCharge(chargeUsed, chargeScaler); this.PlayCrossfade("Gesture", "FireBomb", "ChargeBomb.playbackRate", this.duration * (1f - fireDelay), 0.2f); this.hasFired = true; if (!NetworkServer.active) { return; } Vector3 dir = this.GetAimRay().direction; dir.y = 0f; dir = Vector3.Normalize(dir); SparkOrb nextOrb = new SparkOrb(); nextOrb.attacker = this.gameObject; nextOrb.crit = this.RollCrit(); nextOrb.damage = this.damageStat * damageRatio * chargeState.chargeScaler; nextOrb.damageColor = DamageColorIndex.Default; nextOrb.direction = dir; nextOrb.origin = this.GetAimRay().origin; nextOrb.procCoef = 1.0f; nextOrb.isFirst = true; nextOrb.radius = radius; nextOrb.scale = 1.0f; nextOrb.speed = 50.0f; nextOrb.stepDist = 8.0f; nextOrb.stepHeight = 5.0f; nextOrb.maxFall = 25f; nextOrb.innerRadScale = 0.25f; nextOrb.edgePenaltyMult = 0.35f; nextOrb.stepsLeft = 1 + (Int32)Math.Truncate(chargeState.chargeConsumed / 7.5); nextOrb.team = TeamComponent.GetObjectTeam(this.gameObject); nextOrb.skin = this.skin; OrbManager.instance.AddOrb(nextOrb); }
private void Fire(WispPassiveController.ChargeState state) { if (!this.isAuthority) { return; } Ray r = new Ray(this.muzzle.position, this.muzzle.forward); this.BeamAttack(new BeamAttackInfo { aim = r, range = baseMaxRange, radius = baseRadius, damage = this.damageStat * baseDamageMult * state.chargeScaler, force = 100f, procCoef = baseProcCoef, crit = this.RollCrit() }); }