示例#1
0
        protected ChunkRenderableBase CreateChunkRenderer(Chunk chunk, Vector3 position, Quaternion rotation)
        {
            ChunkRenderableBase r = (ChunkRenderableBase)System.Activator.CreateInstance(globalSettings.renderSetup.renderableClass);

            r.Init(this, chunk);

            // Forced geometry generation
            chunk.dirty = true;

            return(r);
        }
示例#2
0
 protected override bool ShouldDisappear(ChunkRenderableBase r)
 {
     return((new Vector2(follows.position.x, follows.position.z) - new Vector2(r.position.x, r.position.z)).magnitude > (disappearDistance) || r.position.y > (worldHeight * 32.0f));
 }
示例#3
0
 protected virtual bool ShouldDisappear(ChunkRenderableBase r)
 {
     return((new Vector3(follows.position.x, follows.position.y, follows.position.z) - r.position).magnitude > (showDistance));
 }