void OnTriggerStay(Collider col) { if (col.transform.parent) { if (col.transform.parent.GetComponent <W_platform>()) //Collision with mobile Platform { if (!CrossPlatformInputManager.GetButtonDown("Jump") && !Input.GetKey(KeyCode.Space)) { transform.parent = col.transform.parent; } return; } } if (col.transform.tag.Equals("AttackParent")) //Collision with mobile Platform2 { if (!CrossPlatformInputManager.GetButtonDown("Jump") && !Input.GetKey(KeyCode.Space)) { transform.SetParent(col.transform); } return; } else if (col.transform.tag.Equals("GelidWaters"))//Entrata e staziona in acque gelide { UnFrozen = false; FrozenEffect.gameObject.SetActive(true); ShowFrozenMaterial(); SpeedItem.RemoveScreenIcons(); JumpItem.RemoveScreenIcons(); m_AnimSpeedMultiplier = FrozenAnimSpeed; m_JumpPower = FrozenJumpPower; } }
private static List <JumpList._ShellObjectPair> GenerateJumpItems(IObjectArray shellObjects) { List <JumpList._ShellObjectPair> list = new List <JumpList._ShellObjectPair>(); Guid guid = new Guid("00000000-0000-0000-C000-000000000046"); uint count = shellObjects.GetCount(); for (uint num = 0u; num < count; num += 1u) { object at = shellObjects.GetAt(num, ref guid); JumpItem jumpItem = null; try { jumpItem = JumpList.GetJumpItemForShellObject(at); } catch (Exception ex) { if (ex is NullReferenceException || ex is SEHException) { throw; } } list.Add(new JumpList._ShellObjectPair { ShellObject = at, JumpItem = jumpItem }); } return(list); }
private static object GetShellObjectForJumpItem(JumpItem jumpItem) { JumpPath jumpPath = jumpItem as JumpPath; JumpTask jumpTask = jumpItem as JumpTask; if (jumpPath != null) { return(JumpList.CreateItemFromJumpPath(jumpPath)); } if (jumpTask != null) { return(JumpList.CreateLinkFromJumpTask(jumpTask, true)); } return(null); }
public static ApplicationJumpItemInfo Unwrap(JumpItem jumpItem) { ApplicationJumpTaskWrap applicationJumpTaskWrap = jumpItem as ApplicationJumpTaskWrap; if (applicationJumpTaskWrap != null) { return(applicationJumpTaskWrap.ApplicationJumpTask); } ApplicationJumpPathWrap applicationJumpPathWrap = jumpItem as ApplicationJumpPathWrap; if (applicationJumpPathWrap != null) { return(applicationJumpPathWrap.ApplicationJumpPath); } throw new ArgumentException(string.Empty, "jumpItem"); }
JumpItem PrepareItem(ApplicationJumpItemInfo item, JumpItem itemToReplace) { JumpItem itemWrap = ApplicationJumpItemWrapper.Wrap(item); ApplicationJumpTaskWrap task = itemWrap as ApplicationJumpTaskWrap; if (task != null) { PrepareTask(task); JumpItem existingItem = nativeJumpList.Find(task.ApplicationJumpTask.CommandId); if (existingItem != null && existingItem != itemToReplace) { throw new ApplicationJumpTaskDuplicateCommandIdException(); } } ISupportInitialize itemInit = item; itemInit.EndInit(); return(itemWrap); }
void Accounts_ValueAdded(object sender, KeyValuePair <ushort, Settings.ISettingValue <Settings.IAccount> > e) { lock (this) { var account = e.Value.Value; if (!accounts.ContainsKey(account.UID)) { var j = new JumpItem(account); accounts[account.UID] = j; OnAccountAdded(e.Value, account); if (IsEnabled(j)) { RefreshAsync(); } } } }
public static void FillWrapProperties(JumpItem jumpItem) { ApplicationJumpTaskWrap applicationJumpTaskWrap = jumpItem as ApplicationJumpTaskWrap; if (applicationJumpTaskWrap != null) { applicationJumpTaskWrap.CustomCategory = applicationJumpTaskWrap.ApplicationJumpTask.CustomCategory; applicationJumpTaskWrap.Title = applicationJumpTaskWrap.ApplicationJumpTask.Title; applicationJumpTaskWrap.Description = applicationJumpTaskWrap.ApplicationJumpTask.Description; return; } ApplicationJumpPathWrap applicationJumpPathWrap = jumpItem as ApplicationJumpPathWrap; if (applicationJumpPathWrap != null) { applicationJumpPathWrap.CustomCategory = applicationJumpPathWrap.ApplicationJumpPath.CustomCategory; applicationJumpPathWrap.Path = applicationJumpPathWrap.ApplicationJumpPath.Path; return; } throw new ArgumentException(string.Empty, "jumpItem"); }
public JumpList(IntPtr window) { accounts = new Dictionary <ushort, JumpItem>(); jumplist = new Windows.JumpList(window); jumplist.Removed += jumplist_Removed; Settings.Accounts.ValueChanged += Accounts_ValueChanged; Settings.Accounts.ValueAdded += Accounts_ValueAdded; Settings.Accounts.ValueRemoved += Accounts_ValueRemoved; Settings.Sorting.ValueChanged += Sorting_ValueChanged; Settings.JumpList.ValueChanged += JumpList_ValueChanged; Client.Launcher.AccountLaunched += Launcher_AccountLaunched; Client.Launcher.AccountExited += Launcher_AccountExited; lock (this) { foreach (var uid in Settings.Accounts.GetKeys()) { var a = Settings.Accounts[uid]; if (a.HasValue) { var account = a.Value; var j = new JumpItem(account); accounts[account.UID] = j; j.IsActive = Client.Launcher.IsActive(account); OnAccountAdded(a, account); } } } if (accounts.Count > 0) { RefreshAsync(); } }
public virtual bool AddOrReplace(ApplicationJumpTaskInfo jumpTask) { if (InteractionHelper.IsInDesignMode(this)) { designModeItems.Add(jumpTask); return(true); } ApplicationJumpTaskWrap jumpTaskWrap = new ApplicationJumpTaskWrap(jumpTask); PrepareTask(jumpTaskWrap); ISupportInitialize itemInit = jumpTask; itemInit.EndInit(); JumpItem existingItem = nativeJumpList.Find(jumpTask.CommandId); if (existingItem != null) { nativeJumpList[nativeJumpList.IndexOf(existingItem)] = jumpTaskWrap; return(false); } nativeJumpList.Add(jumpTaskWrap); return(true); }
private bool IsEnabled(JumpItem j) { if (j.Account.JumpListPinning == Settings.JumpListPinning.Disabled) { return(false); } var v = Settings.JumpList.Value; if ((v & Settings.JumpListOptions.OnlyShowDaily) == Settings.JumpListOptions.OnlyShowDaily) { if (j.IsActive || j.Account.LastUsedUtc.Date == DateTime.UtcNow.Date) { return(false); } } else if ((v & Settings.JumpListOptions.OnlyShowInactive) == Settings.JumpListOptions.OnlyShowInactive) { return(!j.IsActive); } return(true); }
public static string GetJumpItemCommandId(JumpItem jumpItem) { ApplicationJumpTaskWrap jumpTask = jumpItem as ApplicationJumpTaskWrap; return(jumpTask == null ? null : jumpTask.ApplicationJumpTask.CommandId); }
void Awake() { Instance = this; }