Esempio n. 1
0
 public HealthBar(KillableGameObject parent)
 {
     Parent = parent;
     Percent = 1;
     Texture = new Texture2D(GameServices.GetService<GraphicsDevice>(), 1, 1, false, SurfaceFormat.Color);
     Texture.SetData(new[] { Color.White });
 }
Esempio n. 2
0
 public HealthBar(KillableGameObject parent)
 {
     Parent  = parent;
     Percent = 1;
     Texture = new Texture2D(GameServices.GetService <GraphicsDevice>(), 1, 1, false, SurfaceFormat.Color);
     Texture.SetData(new[] { Color.White });
 }
Esempio n. 3
0
        public void OnImpact(GameObject Object)
        {
            if (Object is KillableGameObject) {
                Victim = (KillableGameObject) Object;
                Victim.Disable();

                Timer timer = new Timer(Duration);
                timer.Elapsed += RemoveEffect;
                timer.AutoReset = false;
                timer.Start();
            }
        }
Esempio n. 4
0
        public void OnImpact(GameObject Object)
        {
            if (Object is KillableGameObject)
            {
                Victim = (KillableGameObject)Object;
                Victim.Disable();

                Timer timer = new Timer(Duration);
                timer.Elapsed  += RemoveEffect;
                timer.AutoReset = false;
                timer.Start();
            }
        }