private void Hit(int damage) { this.Health -= damage; if (this.Health <= 0) { if (BoltNetwork.isRunning) { BreakPlank breakPlank = BreakPlank.Create(GlobalTargets.OnlyServer); breakPlank.Index = CoopWoodPlanks.Instance.GetIndex(this); breakPlank.Send(); } else { this.CutDown(); } } }
public override void OnEvent(BreakPlank evnt) { CoopWeatherProxy.Instance.state.BreakableWalls[evnt.Index] = 1; }