protected override void EnableMod(ItemModRepresentation.Reason reason) { LaserBeam anyBeam = null; foreach (LaserBeam beam2 in this.beams) { if (beam2 != null) { anyBeam = beam2; beam2.enabled = this.is_vm || allow_3rd_lasers; } } if (reason == ItemModRepresentation.Reason.Explicit) { this.PlaySound(anyBeam, base.modDataBlock.onSound); } }
protected override void DisableMod(ItemModRepresentation.Reason reason) { LaserBeam anyBeam = null; foreach (LaserBeam beam2 in this.beams) { if (beam2 != null) { anyBeam = beam2; beam2.enabled = false; } } if (reason == ItemModRepresentation.Reason.Explicit) { this.PlaySound(anyBeam, base.modDataBlock.offSound); } }
protected override void EnableMod(ItemModRepresentation.Reason reason) { Light anyLight = null; foreach (Light light2 in this.lights) { if (light2 != null) { light2.enabled = true; anyLight = light2; } } if (reason == ItemModRepresentation.Reason.Explicit) { this.PlaySound(anyLight, base.modDataBlock.onSound); } }
protected void SetOn(bool on, ItemModRepresentation.Reason reason) { if (this._on != on) { this._on = on; if (this._attached) { if (!on) { this.DisableMod(reason); } else { this.EnableMod(reason); } } } }
protected override void EnableMod(ItemModRepresentation.Reason reason) { LaserBeam laserBeam = null; LaserBeam[] laserBeamArray = this.beams; for (int i = 0; i < (int)laserBeamArray.Length; i++) { LaserBeam laserBeam1 = laserBeamArray[i]; if (laserBeam1) { laserBeam = laserBeam1; laserBeam1.enabled = (this.is_vm ? true : LaserModRep.allow_3rd_lasers); } } if (reason == ItemModRepresentation.Reason.Explicit) { this.PlaySound(laserBeam, base.modDataBlock.onSound); } }
protected override void DisableMod(ItemModRepresentation.Reason reason) { LaserBeam laserBeam = null; LaserBeam[] laserBeamArray = this.beams; for (int i = 0; i < (int)laserBeamArray.Length; i++) { LaserBeam laserBeam1 = laserBeamArray[i]; if (laserBeam1) { laserBeam = laserBeam1; laserBeam1.enabled = false; } } if (reason == ItemModRepresentation.Reason.Explicit) { this.PlaySound(laserBeam, base.modDataBlock.offSound); } }
protected override void EnableMod(ItemModRepresentation.Reason reason) { Light light = null; Light[] lightArray = this.lights; for (int i = 0; i < (int)lightArray.Length; i++) { Light light1 = lightArray[i]; if (light1) { light1.enabled = true; light = light1; } } if (reason == ItemModRepresentation.Reason.Explicit) { this.PlaySound(light, base.modDataBlock.onSound); } }
protected override void EnableMod(ItemModRepresentation.Reason reason) { }
protected virtual void BindStateFlags(CharacterStateFlags flags, ItemModRepresentation.Reason reason) { }
protected override void BindStateFlags(CharacterStateFlags flags, ItemModRepresentation.Reason reason) { base.BindStateFlags(flags, reason); base.SetOn(flags.laser, reason); }
protected abstract void EnableMod(ItemModRepresentation.Reason reason);