public HealthBar(KillableGameObject parent) { Parent = parent; Percent = 1; Texture = new Texture2D(GameServices.GetService<GraphicsDevice>(), 1, 1, false, SurfaceFormat.Color); Texture.SetData(new[] { Color.White }); }
public HealthBar(KillableGameObject parent) { Parent = parent; Percent = 1; Texture = new Texture2D(GameServices.GetService <GraphicsDevice>(), 1, 1, false, SurfaceFormat.Color); Texture.SetData(new[] { Color.White }); }
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(); } }
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(); } }