forked from BitcoderCZ/BuildPlate_Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Palette.cs
34 lines (28 loc) · 1.05 KB
/
Palette.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BuildPlate_Editor
{
public class Palette
{
public static readonly Palette NULL = new Palette("bpe:null", 0, new int[0]);
public int[] textures;
public int data;
public string name;
public Palette(string _name, int _data, int[] _textures)
{
name = _name;
data = _data;
textures = _textures;
}
public Palette(string _name, int _data, int _texture) : this(_name, _data, new int[1] { _texture })
{ }
public static bool operator ==(Palette a, Palette b)
=> a.textures.Length == b.textures.Length && a.data == b.data && a.name == b.name;
public static bool operator !=(Palette a, Palette b)
=> a.textures.Length != b.textures.Length || a.data != b.data || a.name != b.name;
public override string ToString() => $"Name: {name}, Numb tex: {textures.Length}, Data: {data}";
}
}