Example #1
0
 /**
  * Will set the image that is currently be used for the panels draw
  * @param image the location of the desired image
  */
 public virtual void setImage(Sprite image)
 {
     if (image != null && image.isLoaded())
     {
         Background.setSprite(image);
     }
 }
Example #2
0
        public BaseEnemy(ResourceLibrary library) : base()
        {
            hostSet  = null;
            hostNode = null;

            base.setCenterY(-5);
            base.setSize(5f, 5f);
            base.rectangleVisible = false;
            base.spriteVisible    = true;
            base.visible          = true;

            unrevealedSprite = (Sprite)BaseCode.activeLibrary.getResource("GhostLight/GhostLight/resources/unrevealed.png");

            selected         = new DrawRectangle();
            selected.visible = false;
            selected.setSprite((Sprite)BaseCode.activeLibrary.getResource("GhostLight/GhostLight/resources/glow.png"));
            selected.rectangleVisible = false;
            updateSelected();

            highLight         = new DrawRectangle();
            highLight.visible = true;
            highLight.setSprite((Sprite)BaseCode.activeLibrary.getResource("GhostLight/GhostLight/resources/sparcle/sparcle1.png"));
            highLight.rectangleVisible = false;
            updateHighLight();
            highLight.visible = false;

            displayedScore            = new Text();
            displayedScore.targetFont = (LoadableFont)BaseCode.activeLibrary.getResource(LoadableFont.createFontID("Comic Sans MS", 1.5f, FontStyle.Italic));
            displayedScore.textColor  = Color.White;
            displayedScore.visible    = false;
            updateDisplayedScore();

            health.setMaxSegments(2);
            health.setMaxSegments(health.getMaxSegments());
            health.visible = false;
            health.setWidth(base.getWidth());
            health.setHeight(1.4f);
            health.setColor(Color.LightGreen);

            infectBar.setColor(Color.FromArgb(10, 80, 40));
            infectBar.visible = false;

            infectCloud = new DrawRectangle();
            infectCloud.setSprite((Sprite)library.getResource("GhostLight/GhostLight/resources/infected.png"));
            infectCloud.rectangleVisible = false;
            infectCloud.visible          = false;

            base.setPriority(2);
            updateImage();
        }
Example #3
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);
        }