Пример #1
0
    void Update()
    {
        //Update sim skill levels
        SkillLevelsMethod();

        //if Sim is selected then enable text and disable other sims' text
        if (isSimSelected == true)
        {
            //disable other sims' text
            if (!hasRunDisable)
            {
                //only instantiate if window does not already exist
                if (simWindowCanvasObj == null)
                {
                    //instantiate window
                    simWindowCanvasObj = Instantiate(simWindowCanvasPrefab, Vector3.zero, Quaternion.identity) as GameObject;
                    //set simwindowtextmanager's sim object to this sim
                    simWindowTextManagerScript        = simWindowCanvasObj.GetComponentInChildren <SimWindowTextManager>();
                    simWindowTextManagerScript.simObj = gameObject;
                }
                DisableOtherSimText();
                hasRunDisable = true;
            }
        }

        if (Input.GetMouseButtonUp(1))
        {
            isSimSelected = false;
        }
    }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     simWindowTextScript = transform.parent.GetComponent <SimWindowTextManager>();
     JobChoiceDropDown.onValueChanged.AddListener(ValueChangeAction);
     //menuUsed = false;
 }
Пример #3
0
 void Start()
 {
     simWindowTxtManagerScript = transform.parent.GetComponent <SimWindowTextManager>();
     simObj           = simWindowTxtManagerScript.simObj;
     simManagerScript = simObj.GetComponent <SimManager>();
 }