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;
    }
示例#2
0
 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();
 }
示例#3
0
 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;
     }
 }
示例#4
0
    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);
        }
    }
示例#5
0
 public virtual void Activate()
 {
     transform.parent.gameObject.SetActive(true);
     GetComponentInParent <Canvas>().sortingOrder = ++PlayerViewScript.currentLayer;        // move window to top
     PlayerViewScript.SetCurrentWindow(this);
 }