public void Initialize(SectorCreatorMouse.PlaceableObject core, SectorCreatorMouse mouse) { shellcore = core.assetID == "shellcore_blueprint"; JSONField.transform.parent.gameObject.SetActive(shellcore); if (core.type == SectorCreatorMouse.ObjectTypes.Flag) { factionDropdown.transform.parent.gameObject.SetActive(false); } PlayerViewScript.SetCurrentWindow(this); this.mouse = mouse; currentCore = core; window.SetActive(true); if (currentCore.shellcoreJSON != null) { JSONField.text = currentCore.shellcoreJSON; } if (core.type != SectorCreatorMouse.ObjectTypes.Flag) { factionDropdown.value = currentCore.faction; } IDField.text = core.obj.name; }
void Initialize() { GetComponent <RectTransform>().anchoredPosition = Vector2.zero; AudioManager.PlayClipByID("clip_select"); PlayerViewScript.SetCurrentWindow(this); GetComponentInParent <Canvas>().sortingOrder = ++PlayerViewScript.currentLayer; playerName.text = "<color=yellow>" + player.cursave.name + "</color>"; base.Activate(); }
public virtual void Activate() { transform.parent.gameObject.SetActive(true); GetComponentInParent <Canvas>().sortingOrder = ++PlayerViewScript.currentLayer; // move window to top PlayerViewScript.SetCurrentWindow(this); if (exitOnPlayerRange && PlayerCore.Instance) { lastPos = PlayerCore.Instance.transform.position; } }
public virtual void ToggleActive() { bool active = transform.parent.gameObject.activeSelf; if (active) { CloseUI(); } else { transform.parent.gameObject.SetActive(true); GetComponentInParent <Canvas>().sortingOrder = ++PlayerViewScript.currentLayer; // move window to top PlayerViewScript.SetCurrentWindow(this); } }
public virtual void Activate() { transform.parent.gameObject.SetActive(true); GetComponentInParent <Canvas>().sortingOrder = ++PlayerViewScript.currentLayer; // move window to top PlayerViewScript.SetCurrentWindow(this); }