Ejemplo n.º 1
0
 public Platform(Vector2 position, string textureKey, float layer, bool isLadder, Material.Preset materialPreset)
     : base(position, textureKey, layer)
 {
     this.materialPreset = materialPreset;
     origin = new Vector2((baseTexture.Width / 2) - ((baseTexture.Width / 2) % 8), (baseTexture.Height / 2) - ((baseTexture.Height / 2) % 8));
     SetMaterial(materialPreset);
     identifier = SaveFileManager.SaveTypeIdentifier.Platform;
     IsLadder = isLadder;
 }
Ejemplo n.º 2
0
 public static void ReplaceRGB(ref Texture2D texture, Material material)
 {
     ReplaceRGB(ref texture, material.redReplacement, material.greenReplacement, material.blueReplacement);
 }
Ejemplo n.º 3
0
 public void SetMaterial(Material.Preset materialPreset)
 {
     this.materialPreset = materialPreset;
     material = new Material(materialPreset);
     baseTexture = Repainter.GetTextureCopy(Library.textures[textureKey]);
     Repainter.ReplaceRGB(ref baseTexture, material);
     needsRedraw = true;
 }
Ejemplo n.º 4
0
 public Trap(Vector2 position, string textureKey, float layer, bool isLadder, Material.Preset materialPreset)
     : base(position, textureKey, layer, isLadder, materialPreset)
 {
     damage = 1f;
     identifier = SaveFileManager.SaveTypeIdentifier.Trap;
 }