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; }
public static void ReplaceRGB(ref Texture2D texture, Material material) { ReplaceRGB(ref texture, material.redReplacement, material.greenReplacement, material.blueReplacement); }
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; }
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; }