36 public virtual void Update(
float dt) {
41 if (terrainChunk ==
null) {
58 while (num2 <= topHeightFast) {
63 for (
int i = 0; i < array.Length; i++) {
64 int x = terrainChunk.Origin.X +
m_pollX;
66 int z = terrainChunk.Origin.Y +
m_pollZ;
72 $
"{array[i]} Poll {BlocksManager.Blocks[num3].GetType().Name} {cellValueFast} at ({x},{y},{z}) \n{e}"
89 if (terrainChunk ==
null) {
104 Point2 value = valuesDictionary.GetValue<
Point2>(
"PollPoint");
107 m_pollPass = valuesDictionary.GetValue<
int>(
"PollPass");
119 valuesDictionary.SetValue(
"PollPass",
m_pollPass);
static void Error(object message)
virtual void Update(float dt)
SubsystemPollableBlockBehavior[][] m_pollableBehaviorsByContents
SubsystemBlockBehaviors m_subsystemBlockBehaviors
virtual Action< TerrainChunk > ScanningChunkCompleted
override void Load(ValuesDictionary valuesDictionary)
SubsystemTime m_subsystemTime
float MaxShaftsToPollPerFrame
每帧会进行多少xz格的方块检查
Point2 m_pollChunkCoordinates
SubsystemTerrain m_subsystemTerrain
override void Save(ValuesDictionary valuesDictionary)
void OnPoll(int value, int x, int y, int z, int pollPass)
static int CalculateCellIndex(int x, int y, int z)
virtual int GetCellValueFast(int index)
virtual int GetTopHeightFast(int x, int z)
static int ExtractContents(int value)
virtual TerrainChunk LoopChunks(int startChunkX, int startChunkZ, bool skipStartChunk, out bool hasLooped)
ValuesDictionary ValuesDictionary