1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System;
- public struct Vector3Int
- {
- public Vector3Int(int x, int y, int z)
- {
- this.m_x = x;
- this.m_y = y;
- this.m_z = z;
- }
- public int x
- {
- get
- {
- return this.m_x;
- }
- set
- {
- this.m_x = value;
- }
- }
- public int y
- {
- get
- {
- return this.m_y;
- }
- set
- {
- this.m_y = value;
- }
- }
- public int z
- {
- get
- {
- return this.m_z;
- }
- set
- {
- this.m_z = value;
- }
- }
- public void Set(int x, int y, int z)
- {
- this.m_x = x;
- this.m_y = y;
- this.m_z = z;
- }
- public override bool Equals(object obj)
- {
- Vector3Int vector3Int = (Vector3Int)obj;
- return this.x == vector3Int.x && this.y == vector3Int.y && this.z == vector3Int.z;
- }
- public static bool operator ==(Vector3Int a, Vector3Int b)
- {
- return a.Equals(b);
- }
- public static bool operator !=(Vector3Int a, Vector3Int b)
- {
- return !a.Equals(b);
- }
- public override int GetHashCode()
- {
- return 0;
- }
- public static Vector3Int zero
- {
- get
- {
- return new Vector3Int(0, 0, 0);
- }
- }
- private int m_x;
- private int m_y;
- private int m_z;
- }
|