forked from K0lb3/UnityPy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColorRGBA.py
More file actions
55 lines (44 loc) · 1.59 KB
/
Copy pathColorRGBA.py
File metadata and controls
55 lines (44 loc) · 1.59 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# from .Vector4 import Vector4
# class Color:
# R: float
# G: float
# B: float
# A: float
# def __init__(self, r: float = 0.0, g: float = 0.0, b: float = 0.0, a: float = 0.0):
# self.R = r
# self.G = g
# self.B = b
# self.A = a
# def __eq__(self, other):
# if isinstance(other, Color):
# return self.__dict__ == other.__dict__
# else:
# return False
# def __add__(self, other):
# return Color(
# self.R + other.R, self.G + other.G, self.B + other.B, self.A + other.A
# )
# def __sub__(self, other):
# return Color(
# self.R - other.R, self.G - other.G, self.B - other.B, self.A - other.A
# )
# def __mul__(self, other):
# if isinstance(other, Color):
# return Color(
# self.R * other.R, self.G * other.G, self.B * other.B, self.A * other.A
# )
# else:
# return Color(self.R * other, self.G * other, self.B * other, self.A * other)
# def __div__(self, other):
# if isinstance(other, Color):
# return Color(
# self.R / other.R, self.G / other.G, self.B / other.B, self.A / other.A
# )
# else:
# return Color(self.R / other, self.G / other, self.B / other, self.A / other)
# def __eq__(self, other):
# return self.__dict__ == other.__dict__
# def __ne__(self, other):
# return self.__dict__ != other.__dict__
# def Vector4(self):
# return Vector4(self.R, self.G, self.B, self.A)