Beispiel #1
0
 public PowerupIcon(int x, int y, int levelX, int levelY, int tileX, int tileY, Type powerupType)
     : base(x, y, levelX, levelY, tileX, tileY)
 {
     DrawDetails = false;
     DetailsAboveIcon = true;
     CollectedSound = "CollectPowerup";
     background = new AnimatedTexture("fairyglow", 4, BACKGROUND_ANIMATION_TIMESTEP);
     isCoOp = powerupType.IsSubclassOf(typeof(CoOpPowerup));
     this.powerupType = powerupType;
     this.icon = Powerups.DummyPowerups[powerupType].Icon;
     this.iconBackgroundTint = Powerups.DummyPowerups[powerupType].TintColor;
     texture = null;
     baseScore = POWERUP_COLLECTED_SCORE;
     emitter = Emitter.getPrebuiltEmitter(PrebuiltEmitter.PrisonerSparks);
     emitter.startColor = new Color(iconBackgroundTint.R, iconBackgroundTint.G, iconBackgroundTint.B, 255);
     emitter.endColor = new Color(iconBackgroundTint.R, iconBackgroundTint.G, iconBackgroundTint.B, 0);
 }
Beispiel #2
0
 public void setTexture(AnimatedTexture tex)
 {
     if (texture != null)
     {
         foreach (Hitbox hitbox in texture.onFrameHitboxes)
         {
             if (hitbox != null)
             {
                 hitbox.active = false;
             }
         }
     }
     texture = tex;
     texture.Update(null, this);
     if (texture.onStart != null)
     {
         texture.onStart();
     }
 }
Beispiel #3
0
 public void setTexture(AnimatedTexture tex)
 {
     if (texture != null)
         foreach (Hitbox hitbox in texture.onFrameHitboxes)
             if (hitbox != null)
             {
                 hitbox.active = false;
             }
     texture = tex;
     texture.Update(null, this);
     if (texture.onStart != null)
         texture.onStart();
 }
Beispiel #4
0
 public void setTexture(string tex)
 {
     texture = new AnimatedTexture(tex);
 }
Beispiel #5
0
 public void setTexture(string tex)
 {
     texture = new AnimatedTexture(tex);
 }