예제 #1
0
        public override void Dispose()
        {
            OnDisposeWorld();
#if Client
            TickSystem.RemoveTick(this);
#elif Server
            Server.Tick -= Tick;
#endif
        }
예제 #2
0
        public override void Dispose()
        {
#if Client
            TickSystem.RemoveTick(this);
#elif Server
            Server.Tick -= Tick;
#endif

            _IsEntityReady = false;
        }
예제 #3
0
        public override void Dispose()
        {
            isReady = false;

            for (int i = 0; i < _trees.Count; i++)
            {
                _trees[i].OnDestroy();
            }

            _trees.Clear();

            TickSystem.RemoveTick(this);

            if (_meshRender != null)
            {
                _meshRender.Dispose();
            }

            if (_waterMeshRender != null)
            {
                _waterMeshRender.Dispose();
            }

            if (ChunkMesh != null)
            {
                ChunkMesh.Dispose();
            }

            if (WaterMesh != null)
            {
                WaterMesh.Dispose();
            }

            if (_meshCollider != null)
            {
                _meshCollider.Dispose();
            }
        }