public Block(RoomBlockComponent roomBlockComponent, double minRoadDistance, double maxRoadDistance) { blockId = IdGenerater.GenerateId(); _roomBlockComponent = roomBlockComponent; _minRoadDistance_m = minRoadDistance; _maxRoadDistance_m = maxRoadDistance; }
public void Release() { for (int i = 0; i < _blockChannels.Count; i++) { if (_blockChannels[i] != null) { _blockChannels[i].Release(); } } _blockChannels.Clear(); _roomBlockComponent = null; }
public void SetDistanceTravelled(double distanceTravelled) { Info.DistanceTravelled = distanceTravelled; //告訴Block更新位置 if (RoomBlockComponent != null) { RoomBlockComponent.ModifyPosition(this, Info.DistanceTravelled); } else { Log.Error($"SetDistanceTravelled Failed, 找不到RoomBlockComponent, RoomId:{Room.Id}, Uid:{Uid}"); } }