示例#1
0
        protected void UpdateFireTrail()
        {
            if (Hull.CurrentHitpoints / Hull.MaxHitpoints <= 0.5f && Hull.CurrentHitpoints > 0.0f)
            {
                if (Smoke == null)
                {
                    Smoke = new SmokeTrail();
                    Smoke.NoReplication = true;
                    Root.Instance.Scene.Spawn(Smoke);
                    Smoke.Attach = this;

                    FireLight = new Light();
                    FireLight.NoReplication = true;
                    FireLight.directional = false;
                    FireLight.Range = 1000;
                    FireLight.diffuse = new Color4f(1, 0.8f, 0.1f, 1.0f);
                    FireLight.Attach = this;
                    Root.Instance.Scene.Spawn(FireLight);
                }
            }
            else if (Smoke != null)
            {
                Smoke.Attach = null;
                Smoke = null;

                FireLight.Kill = true;
                FireLight.Attach = null;
                FireLight = null;
            }
        }
示例#2
0
 public Missile(DeSerializationContext context)
     : base(context)
 {
     NoReplication = false;
     Smoke = new SmokeTrail();
     Smoke.NoReplication = true;
     Root.Instance.Scene.Spawn(Smoke);
     Smoke.Attach = this;
     Smoke.Smoke.PointSize = 50;
 }
示例#3
0
        public override void OnRemove(Scene s)
        {
            base.OnRemove(s);

            if (Smoke != null)
            {
                Smoke.Attach = null;
                Smoke = null;

                FireLight.Kill = true;
                FireLight.Attach = null;
                FireLight = null;
            }
        }
示例#4
0
 public Missile()
 {
     NoReplication = false;
     Smoke = new SmokeTrail();
     Smoke.NoReplication = true;
     Root.Instance.Scene.Spawn(Smoke);
     Smoke.Attach = this;
     Smoke.Smoke.PointSize = 50;
 }