public static void SetPlayerToUnitPosition(PlayerEntity player, UnitPosition up) { up.SetX(player.position.Value.x); up.SetY(player.position.Value.y); up.SetZ(player.position.Value.z); up.SetYaw(player.orientation.Yaw); up.SetPitch(player.orientation.Pitch); }
public override UnitPosition Select(IEventArgs args) { UnitPosition up = new UnitPosition(); up.SetX(FreeUtil.ReplaceFloat(x, args)); up.SetY(FreeUtil.ReplaceFloat(y, args)); up.SetZ(FreeUtil.ReplaceFloat(z, args)); up.SetYaw(FreeUtil.ReplaceFloat(yaw, args)); up.SetPitch(FreeUtil.ReplaceFloat(pitch, args)); return(up); }
public override UnitPosition Select(IEventArgs args) { UnitPosition up = new UnitPosition(); up.SetX(FreeUtil.ReplaceFloat(x, args)); up.SetY(FreeUtil.ReplaceFloat(y, args)); up.SetZ(FreeUtil.ReplaceFloat(z, args)); up.SetYaw(FreeUtil.ReplaceFloat(yaw, args)); up.SetPitch(FreeUtil.ReplaceFloat(pitch, args)); up.SetInvalid(FreeUtil.ReplaceBool(invalid, args)); up.SetRandomindex(FreeUtil.ReplaceInt(randomindex, args)); return(up); }
private void Adjust(UnitPosition up, IEventArgs args) { up.SetX(up.GetX() + FreeUtil.ReplaceInt(x, args)); up.SetY(up.GetY() + FreeUtil.ReplaceInt(y, args)); up.SetZ(up.GetZ() + FreeUtil.ReplaceInt(z, args)); if (!StringUtil.IsNullOrEmpty(pitch)) { up.SetPitch(FreeUtil.ReplaceFloat(pitch, args)); } if (!StringUtil.IsNullOrEmpty(yaw)) { up.SetYaw(FreeUtil.ReplaceFloat(yaw, args)); } }