public void SetFloat(GMKeyCode code, float value) { FieldSet set = codeMap[code]; int intValue = GmUtil.FloatToInt(value); SetUserValue(set, intValue); }
public float GetFloat(GMKeyCode code) { FieldSet set = codeMap[code]; int value = GetUserValue(set.gmField); return(GmUtil.IntToFloat(value)); }
public static void SetRotation(BuildObject buildObject, Quaternion rotation) { buildObject.rw = GmUtil.FloatToInt(rotation.w); buildObject.rx = GmUtil.FloatToInt(rotation.x); buildObject.ry = GmUtil.FloatToInt(rotation.y); buildObject.rz = GmUtil.FloatToInt(rotation.z); }
public IGameEntity CreateFromNetwork(string entityId, Character character, TrackData trackData) { Vector3 spawnPosition = GmUtil.TrackdataToVector3(trackData); GameEntityType entityType = GameEntity.GameEntityTypeFromTrackData(trackData); Vector3 spawnPoint = SpawnPoint.Instance().GetNpcSpawnpoint(spawnPosition); IGameEntity gameEntity = Create(entityId, character, entityType, spawnPoint, ControllerType.Remote); return(gameEntity); }
public static Quaternion GetRotation(BuildObject buildObject) { Quaternion r = new Quaternion(); r.w = GmUtil.IntToFloat(buildObject.rw); r.x = GmUtil.IntToFloat(buildObject.rx); r.y = GmUtil.IntToFloat(buildObject.ry); r.z = GmUtil.IntToFloat(buildObject.rz); return(r); }
public Vector3 GetCharacterSpawnpoint(Character character) { if (character.worldx != 0 && character.worldz != 0) { float x = GmUtil.IntToFloat(character.worldx); float y = GmUtil.IntToFloat(character.worldy); float z = GmUtil.IntToFloat(character.worldz); return(new Vector3(x, y, z)); } else { return(GmUtil.Infinity); } }
public void UpdateFromNetwork(TrackData trackData, bool hasDelta) { this.trackData = trackData; if (trackData.broadcast != 1) { if (hasDelta) { position = GmUtil.TrackdataDeltaToVector3(trackData, position); } else { position = GmUtil.TrackdataToVector3(trackData); } } }
private void ShowInvites(GuildInvites invites) { GmUtil.DestroyChildren(invitePanel.transform); foreach (GuildInvite invite in invites.guildInvite) { GameObject go = GameObject.Instantiate(inviteTemplate); go.SetActive(true); go.transform.SetParent(invitePanel.transform); go.name = invite.guildId; Text text = go.transform.Find("invite_text").GetComponent <Text>(); text.text = "Invite to " + invite.guildId; GuildInviteInfo info = go.GetComponent <GuildInviteInfo>(); info.guildId = invite.guildId; info.from = invite.from; info.to = invite.to; } }
public void SetRotation(Quaternion value) { trackData = GmUtil.QuaternionToTrackData(value, trackData); }
public void SetSecondaryVector3(Vector3 value) { trackData.userDefinedData = GmUtil.Vector3ToUserDefinedData(value, trackData.userDefinedData); }
public void SetPosition(Vector3 value) { trackData = GmUtil.Vector3ToTrackData(value, trackData); }
public Quaternion GetRotation() { return(GmUtil.TrackdataToQuaternion(trackData)); }
public Vector3 GetSecondaryVector3() { return(GmUtil.UserDefinedDataToVector3(trackData.userDefinedData)); }