Ejemplo n.º 1
0
 /// <summary>
 /// Will convirt a given BeamType to the apropriate lightType
 /// </summary>
 /// <param name="convertTarget">The given BeamType</param>
 /// <returns>the converted lightType</returns>
 private lightType convertType(LightBeam.BeamType convertTarget)
 {
     if (convertTarget == LightBeam.BeamType.LASER)
     {
         return(lightType.LASER);
     }
     else if (convertTarget == LightBeam.BeamType.WIDE)
     {
         return(lightType.WIDE);
     }
     else
     {
         return(lightType.LASER);
     }
 }
Ejemplo n.º 2
0
        public LightButton() : base()
        {
            sparcler.visible = false;
            type             = LightBeam.BeamType.REVEAL;
            base.getBackGround().rectangleVisible = false;

            sparcler.setSprite(sparcle);
            sparcler.rectangleVisible = false;


            setIdleImage(revealIdle);
            setSelectImage(revealSelected);
            setInactiveImage(circleBlank);
            setMouseOverIdleImage(revealMouseOver);
            setMouseOverSelectImage(revealMouseOverSelected);
        }
Ejemplo n.º 3
0
 /**
  * Will set the lightBam this light will moniter and what  BeamType this button will respond too
  */
 public void setResponsibility(LightBeam light, LightBeam.BeamType lightType)
 {
     if (light != null)
     {
         localLight = light;
         selectable = true;
         if (lightType != type)
         {
             if (lightType == LightBeam.BeamType.REVEAL)
             {
                 type = lightType;
                 setIdleImage(revealIdle);
                 setSelectImage(revealSelected);
                 setInactiveImage(circleBlank);
                 setMouseOverIdleImage(revealMouseOver);
                 setMouseOverSelectImage(revealMouseOverSelected);
             }
             else if (lightType == LightBeam.BeamType.WIDE)
             {
                 type = lightType;
                 setIdleImage(wideIdle);
                 setSelectImage(wideSelected);
                 setInactiveImage(circleBlank);
                 setMouseOverIdleImage(wideMouseOver);
                 setMouseOverSelectImage(wideMouseOverSelected);
             }
             else if (lightType == LightBeam.BeamType.LASER)
             {
                 type = lightType;
                 setIdleImage(lazerIdle);
                 setSelectImage(lazerSelected);
                 setInactiveImage(circleBlank);
                 setMouseOverIdleImage(lazerMouseOver);
                 setMouseOverSelectImage(lazerMouseOverSelected);
             }
         }
         updateImage();
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Will Set the current light type to given lightType
 /// </summary>
 /// <param name="newType">newType light Type that could be used</param>
 public void setLightType(LightBeam.BeamType newType)
 {
     type = convertType(newType);
 }