private void Break() { this.ShieldState = ShieldStatePawn.Charging; Verse.Sound.SoundStarter.PlayOneShot(SoundBreak, (SoundInfo) new TargetInfo(this.Position, this.Map, false)); MoteMaker.MakeStaticMote(this.TrueCenter(), this.Map, ThingDefOf.Mote_ExplosionFlash, 12f); for (int i = 0; i < 6; i++) { UnityEngine.Vector3 loc = this.TrueCenter() + Vector3Utility.HorizontalVectorFromAngle((float)Rand.Range(0, 360)) * Rand.Range(0.3f, 0.6f); MoteMaker.ThrowDustPuff(loc, this.Map, Rand.Range(0.8f, 1.2f)); } this.m_energy = 0; }
public void recharge(int chargeAmmount) { this.m_energy += chargeAmmount; if (this.ShieldState == ShieldStatePawn.Inactive) { this.ShieldState = ShieldStatePawn.Active; } if (this.m_energy > this.maxEnergy) { this.m_energy = this.maxEnergy; } }