public DestructableProp GetProp() { if (_props.Count == 0) { OnRoomDestroyed?.Invoke(this); return(null); } return(_props[Random.Range(0, _props.Count)]); }
public int DestroyProp(DestructableProp prop) { _props.Remove(prop); Broadcast($"They're smashing up {name} , get to the {area} "); if (_props.Count < 1) { OnRoomDestroyed?.Invoke(this); Broadcast($"Room {name} in {area} is completely trashed"); } return(_props.Count); }
private void FireRoomDestroyed(string roomId) { OnRoomDestroyed?.Invoke(roomId); }