Exemple #1
0
        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;
 }
Exemple #6
0
 public static void RemoveLight(Light light)
 {
     lightLogic.RemoveLight(light);
 }
Exemple #7
0
 public static Animation CreateLight(Point location, Light.LightType lightColor, Entity.DirectionType direction)
 {
     return lightLogic.CreateLight(location, lightColor, direction);
 }
Exemple #8
0
 public void Illuminate(Light.LightType color)
 {
     lightBeams.Frequencies[color]++;
     Activate();
 }
Exemple #9
0
 public void RemoveLight(Light light)
 {
     if (lightSet.Contains(light))
     {
         lightSet.Remove(light);
     }
 }