public Animation CreateLight(Point location, Light.LightType lightColor, Entity.DirectionType direction) { Light newLight = new Light(location.X, location.Y); newLight.Type = lightColor; newLight.Direction = direction; lightSet.Add(newLight); return LightAnimation.CreateMovementAnimation(newLight); }
public static Animation CreateMovementAnimation(Light light) { Animation animation = Display.CreateAnimation(light.GetTexture(), light.BoundingBox, double.MaxValue); animation.LayerDepth = Layer.Depth[light.Type == Light.LightType.White ? "WhiteLight" : "ColoredLight"]; animation.AddColorFrame(Light.GetLightColor(light.Type), 0); new Movement(light, animation, 0).Play(); return animation; }
public Movement(Light light, Animation animation, double lastFrameTime) { this.light = light; this.animation = animation; this.lastFrameTime = lastFrameTime; }
public Stop(Light light) { this.light = light; }
public Reflection(Point location, Light.LightType lightColor, Entity.DirectionType direction, double targetTime) { this.location = location; this.lightColor = lightColor; this.direction = direction; this.targetTime = targetTime; }
public static void RemoveLight(Light light) { lightLogic.RemoveLight(light); }
public static Animation CreateLight(Point location, Light.LightType lightColor, Entity.DirectionType direction) { return lightLogic.CreateLight(location, lightColor, direction); }
public void Illuminate(Light.LightType color) { lightBeams.Frequencies[color]++; Activate(); }
public void RemoveLight(Light light) { if (lightSet.Contains(light)) { lightSet.Remove(light); } }