Esempio n. 1
0
 public PlayerData(ushort playerId, int localPlanetId, Float3 color, Double3 position = new Double3(), Float3 rotation = new Float3(), Float3 bodyRotation = new Float3())
 {
     PlayerId      = playerId;
     LocalPlanetId = localPlanetId;
     Color         = color;
     UPosition     = position;
     Rotation      = rotation;
     BodyRotation  = bodyRotation;
 }
Esempio n. 2
0
 public NebulaTransform(Transform transform)
 {
     Position = new Float3(transform.position);
     Rotation = new Float3(transform.eulerAngles);
     Scale    = new Float3(transform.localScale);
 }
Esempio n. 3
0
 public void Deserialize(NetDataReader reader)
 {
     Position = new Float3(reader.GetFloat(), reader.GetFloat(), reader.GetFloat());
     Rotation = new Float3(reader.GetFloat(), reader.GetFloat(), reader.GetFloat());
     Scale    = new Float3(reader.GetFloat(), reader.GetFloat(), reader.GetFloat());
 }
Esempio n. 4
0
 public static Vector3 ToUnity(this Float3 value)
 {
     return(new Vector3(value.x, value.y, value.z));
 }
Esempio n. 5
0
 public PlayerData(ushort playerId, Float3 color, Float3 position = new Float3(), Float3 rotation = new Float3(), Float3 bodyRotation = new Float3())
 {
     PlayerId     = playerId;
     Color        = color;
     Position     = position;
     Rotation     = rotation;
     BodyRotation = bodyRotation;
 }
Esempio n. 6
0
 public PlayerData(ushort playerId, int localPlanetId, Float4[] mechaColors, string username = null, Float3 localPlanetPosition = new Float3(), Double3 position = new Double3(), Float3 rotation = new Float3(), Float3 bodyRotation = new Float3())
 {
     PlayerId            = playerId;
     LocalPlanetId       = localPlanetId;
     MechaColors         = mechaColors;
     Username            = !string.IsNullOrWhiteSpace(username) ? username : $"Player {playerId}";
     LocalPlanetPosition = localPlanetPosition;
     UPosition           = position;
     Rotation            = rotation;
     BodyRotation        = bodyRotation;
     Mecha         = new MechaData();
     Appearance    = null;
     DIYAppearance = null;
     DIYItemId     = new int[0];
     DIYItemValue  = new int[0];
 }
Esempio n. 7
0
 public PlayerData(ushort playerId, int localPlanetId, Float3 mechaColor, string username = null, Float3 localPlanetPosition = new Float3(), Double3 position = new Double3(), Float3 rotation = new Float3(), Float3 bodyRotation = new Float3())
 {
     PlayerId            = playerId;
     LocalPlanetId       = localPlanetId;
     Username            = !string.IsNullOrWhiteSpace(username) ? username : $"Player {playerId}";
     LocalPlanetPosition = localPlanetPosition;
     MechaColor          = mechaColor;
     UPosition           = position;
     Rotation            = rotation;
     BodyRotation        = bodyRotation;
     Mecha = new MechaData();
 }
Esempio n. 8
0
 public PlayerData(ushort playerId, int localPlanetId, Float3 color, string username = null, Float3 localPlanetPosition = new Float3(), Double3 position = new Double3(), Float3 rotation = new Float3(), Float3 bodyRotation = new Float3())
 {
     PlayerId            = playerId;
     LocalPlanetId       = localPlanetId;
     Username            = username ?? $"Player {playerId}";
     LocalPlanetPosition = localPlanetPosition;
     Color        = color;
     UPosition    = position;
     Rotation     = rotation;
     BodyRotation = bodyRotation;
     Mecha        = new MechaData();
 }