void OnUnlock(GameManagerInstance.UnlockStateID id, bool oldState, bool newState) { if (SettingsFilter.Contains(id)) { SetSettable(id, newState); } }
public bool?GetSettable(GameManagerInstance.UnlockStateID id) { if (!Settables.ContainsKey(id)) { return(null); } return(Settables[id]); }
private void Instance_UnlockStateChanged(GameManagerInstance.UnlockStateID arg1, bool arg2, bool arg3) { if (arg1 == _UnlockItem) { IsEnabled = arg3; if (ContainerObject != null) { ContainerObject.SetActive(IsEnabled); } } }
public void SetSettable(GameManagerInstance.UnlockStateID id, bool state) { // if id must alter other settables check here and turn off other settings bool oldState = false; if (Settables.ContainsKey(id)) { oldState = Settables[id]; } Settables[id] = state; OnSettingChanged?.Invoke(id, oldState, Settables[id]); }
private void Instance_UnlockStateChanged(GameManagerInstance.UnlockStateID arg1, bool arg2, bool arg3) { if (arg1 == GameManagerInstance.UnlockStateID.ColourVision) { if (arg3) { gameObject.GetComponent <SpriteRenderer>().enabled = true; } else { gameObject.GetComponent <SpriteRenderer>().enabled = false; } } }
void OnUnlock(GameManagerInstance.UnlockStateID id, bool oldState, bool newState) { if (id == GameManagerInstance.UnlockStateID.ColourVision && newState != oldState) { if (newState) { GetComponent <UnityEngine.PostProcessing.PostProcessingBehaviour>().profile = null; } else { GetComponent <UnityEngine.PostProcessing.PostProcessingBehaviour>().profile = GreyScaleProfile; } } }
public void SetShopItem(GameManagerInstance.UnlockStateID pId, string pDescription = "", ulong pValue = 0) { _UnlockItem = pId; _Description = pDescription; _Cost = pValue; if (Description != null) { Description.text = pDescription; } if (Cost != null) { Cost.text = pValue.ToString(); } }
public void SetSettingItem(GameManagerInstance.UnlockStateID pId, string pDescription = "", ulong pValue = 0) { _UnlockItem = pId; _Description = pDescription; IsEnabled = GameManagerInstance.Instance.GetUnlockState(pId); if (ContainerObject != null) { ContainerObject.SetActive(IsEnabled); } if (Description != null) { Description.text = pDescription; } }
void OnUnlock(GameManagerInstance.UnlockStateID id, bool oldState, bool newState) { if (id == GameManagerInstance.UnlockStateID.Possession && !oldState && newState) { GameObject child = Instantiate(TreadObj) as GameObject; child.transform.parent = transform; child.transform.localPosition = TreadObj.transform.localPosition; } if (id == GameManagerInstance.UnlockStateID.Cannon && !oldState && newState) { GameObject child = Instantiate(CannonObj) as GameObject; child.transform.parent = transform; child.transform.localPosition = CannonObj.transform.localPosition; CannonFire fireable = child.GetComponentInChildren <CannonFire>(); fireable.FacingRightCallback = GetComponent <CharacterController2D>().FacingRight; FireWeapon.WrappedValue = fireable.UseWeapon; } }
void OnUnlock(GameManagerInstance.UnlockStateID id, bool oldState, bool newState) { if (id == GameManagerInstance.UnlockStateID.Hearing) { if (newState) { if (ShopController.Instance.GetOpen()) { ShopMusic.Play(); } else { GameMusic.Play(); } } else { GameMusic.Pause(); ShopMusic.Pause(); } } }
public RefDependsOn(GameManagerInstance.UnlockStateID dependency, Value value) : base(dependency) { WrappedValue = value; }
public ValDependsOn(GameManagerInstance.UnlockStateID dependency) : base(dependency) { WrappedValue = null; }
public DependsOn(GameManagerInstance.UnlockStateID dependency) { Dependency = dependency; }