Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 public Movement(Light light, Animation animation, double lastFrameTime)
 {
     this.light = light;
     this.animation = animation;
     this.lastFrameTime = lastFrameTime;
 }
Ejemplo n.º 4
0
 public Stop(Light light)
 {
     this.light = light;
 }
Ejemplo n.º 5
0
 public Reflection(Point location, Light.LightType lightColor, 
     Entity.DirectionType direction, double targetTime)
 {
     this.location = location;
     this.lightColor = lightColor;
     this.direction = direction;
     this.targetTime = targetTime;
 }
Ejemplo n.º 6
0
 public static void RemoveLight(Light light)
 {
     lightLogic.RemoveLight(light);
 }
Ejemplo n.º 7
0
 public static Animation CreateLight(Point location, Light.LightType lightColor, Entity.DirectionType direction)
 {
     return lightLogic.CreateLight(location, lightColor, direction);
 }
Ejemplo n.º 8
0
 public void Illuminate(Light.LightType color)
 {
     lightBeams.Frequencies[color]++;
     Activate();
 }
Ejemplo n.º 9
0
 public void RemoveLight(Light light)
 {
     if (lightSet.Contains(light))
     {
         lightSet.Remove(light);
     }
 }