Beispiel #1
0
        protected override void OnUpdate(float timeStep)
        {
            base.OnUpdate(timeStep);
            CheckLoad();

            TheCluster.AliveCount -= timeStep;
            if (TheCluster.AliveCount <= 0)
            {
                if (GeoModel != null)
                {
                    Node.RemoveComponent(GeoModel);
                    GeoModel.Dispose();
                    GeoModel = null;

                    TheCluster.DirtyGeo();
                }
                TheCluster.AliveCount = 0;
            }

            if (ShowTimers)
            {
                if (GeoModel == null && TheCluster.AliveCount > 0)
                {
                    TimmerMarker.Position = new Vector3(0, -1, 0);
                }
                else
                {
                    TimmerMarker.Position = new Vector3(0, TheCluster.AliveCount, 0);
                }
            }
        }
Beispiel #2
0
 protected override void Dispose(bool disposing)
 {
     _model?.Dispose();
     base.Dispose(disposing);
 }