protected EnemySet hostSet = null; //The Enemy set the player will affecting public Player() { base.setSize(10.0f, 10.0f); light = new LightBeam(hostSet); base.setSprite(player); base.rectangleVisible = false; }
/// <summary> /// Will load images and other recourses required for the game /// </summary> /// <param name="resources"></param> /// <remarks>Note this function is called automatically once the game has started. and should not b called manualy</remarks> public static void preLoadResources(ResourceLibrary resources) { Life.preLoadResources(resources); BaseEnemy.preLoadResources(resources); Frankenstein.preLoadResources(resources); Cat.preLoadResources(resources); Ghost.preLoadResources(resources); Player.preLoadResources(resources); LightBeam.preLoadResources(resources); Mummy.preLoadResources(resources); Pumpkin.preLoadResources(resources); Spider.preLoadResources(resources); Vampire.preLoadResources(resources); Zombie.preLoadResources(resources); LightButton.preLoadResources(resources); EnemySoundManager.preLoadResources(resources); }
/** * 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(); } }