// Start is called before the first frame update public override void Start() { base.Start(); UserData.RegisterType <PlatformCode>(); Table envTable = new Table(Environment); luaPlatforms = new List <PlatformCode>(); for (int i = 0; i < transform.childCount; i++) { GameObject g = transform.GetChild(i).gameObject; PlatformCode c = new PlatformCode(); luaPlatforms.Add(c); c.Parent = this; c.A = g; c.OgLocal = g.transform.localPosition; c.OgLocal.y = ZeroY; c.DesiredY = Mathf.Round(g.transform.localPosition.y - ZeroY); DynValue val = UserData.Create(c); envTable.Set(i + 1, val); } Environment.Globals["plats"] = envTable; DoStuff(); }
public void ShowToast(string message, ToastLength length, PlatformCode usingPlatforms = PlatformCode.All) { if (!usingPlatforms.HasFlag(PlatformCode.Ios)) { return; } Utilities.Dispatch(async() => { var shouldWait = false; do { lock (_ToastLock) { shouldWait = _HasToast; _HasToast = true; } if (shouldWait) { await Task.Delay(DialogConstants.TOAST_CHECK_NEXT_DELAY); } }while (shouldWait); ShowOrUpdateToast(message, length); var toastTime = length == ToastLength.Long ? DialogConstants.TOAST_LONG_LENGTH : DialogConstants.TOAST_SHORT_LENGTH; await Task.Delay(toastTime / 2); lock (_ToastLock) { _HasToast = false; } }); }
public static string PlatformName(PlatformCode code, bool extended = true) { return(code switch { PlatformCode.MacOSClassic => "Mac OS Classic", PlatformCode.MacOSX => "Mac OS X", PlatformCode.Windows => "Windows", _ => "Unknown" + (extended ? " (" + code.ToString() + ")" : ""), });
public DockerGame(DockerGame other) { this.Arguments = other.Arguments; this.Company = other.Company; this.crc_value = other.crc_value; this.Enabled = other.Enabled; this.ErrorCode = other.ErrorCode; this.Executable = other.Executable; this.FolderName = other.FolderName; this.GUID = other.GUID; this.IGDB_Url = other.IGDB_Url; this.Image = other.Image; this.LastCheck = other.LastCheck; this.Name = other.Name; this.Platform = other.Platform; this.ProductName = other.ProductName; this.Uri = other.Uri; this.Version = other.Version; this.PowerProfiles = new Dictionary <Guid, PowerProfile>(); if (other.PowerProfiles != null) { foreach (PowerProfile profile in other.PowerProfiles.Values) { this.PowerProfiles.Add(profile.ProfileGuid, profile); } } this.Settings = new Dictionary <string, GameSettings>(); if (other.Settings != null) { foreach (GameSettings settings in other.Settings.Values) { this.Settings.Add(settings.FileName, settings); } } this.PowerSpecific = other.PowerSpecific; this.SanityCheck(); }
public void ShowToast(string message, ToastLength length, PlatformCode platformCode = PlatformCode.All) { throw new NotImplementedException(); }