Beispiel #1
0
    protected override void ShowMenu()
    {
        //GameManager._instance.isEditing = true;
        //GameManager._instance.activeObject = gameObject;

        scaleSys.GetComponent <ScaleSys>().maxSacle = maxScale;
        SetScaleSys();
        MyUI ui = myUI.GetComponent <MyUI>();

        ui.SetDeleteButton(true);
        ui.ShowMenuByName(fieldType + "Menu");
        SetMenu(true);
        FindComponents();
        SetListeners();

        float acceRange = maxAcceleration - minAcceleration;
        float acceVar   = (acceleration - minAcceleration) / acceRange;

        acceText.text = acceleration.ToString();
        acceBar.value = acceVar;

        rotationBar.value = transform.localEulerAngles.y / 360;
        rotationText.text = Mathf.Floor(transform.localEulerAngles.y).ToString();

        positiveToggle.isOn = isPositive;
    }
Beispiel #2
0
    protected override void ShowMenu()
    {
        //print("ShowMenu");
        //GameManager._instance.isEditing = true;
        //GameManager._instance.activeObject = gameObject;

        scaleSys.GetComponent <ScaleSys>().maxSacle = maxScale;
        SetScaleSys();
        SetDirectionSys();
        MyUI ui = myUI.GetComponent <MyUI>();

        ui.SetDeleteButton(true);
        ui.ShowMenuByName(fieldType + "Menu");

        float elecRange   = maxElec - minElec;
        float elecVal     = (electric - minElec) / elecRange;
        float magnRange   = maxMagn - minMagn;
        float magnVal     = (magnetic - minMagn) / magnRange;
        float rotationVal = transform.localEulerAngles.y / 360;

        //elecMenu.SetActive(true);
        SetMenu(true);
        FindComponents();
        SetListeners();

        elecText.text     = electric.ToString();
        elecBar.value     = elecVal;
        magnText.text     = magnetic.ToString();
        magnBar.value     = magnVal;
        magnToggle.isOn   = magUp;
        rotationText.text = (Mathf.Floor(transform.localEulerAngles.y)).ToString();
        rotationBar.value = rotationVal;
    }
Beispiel #3
0
    protected override void ShowMenu()
    {
        //GameManager._instance.isEditing = true;
        //GameManager._instance.activeObject = gameObject;

        scaleSys.GetComponent <ScaleSys>().maxSacle = maxScale;
        SetScaleSys();
        MyUI ui = myUI.GetComponent <MyUI>();

        ui.SetDeleteButton(true);
        ui.ShowMenuByName(fieldType + "Menu");
        SetMenu(true);
        FindComponents();
        SetListeners();

        float MGRange    = maxMG - minMG;
        float attenRange = maxAtten - minAtten;
        float MGVar      = (fieldMassXG - minMG) / MGRange;
        float attenVar   = (attenuation - minAtten) / attenRange;

        MGText.text    = fieldMassXG.ToString();
        MGBar.value    = MGVar;
        attenText.text = attenuation.ToString();
        attenBar.value = attenVar;
    }
Beispiel #4
0
    protected override void ShowMenu()
    {
        //GameManager._instance.isEditing = true;
        //GameManager._instance.activeObject = gameObject;
        scaleSys.GetComponent <ScaleSys>().maxSacle = maxScale;
        SetScaleSys();

        MyUI ui = myUI.GetComponent <MyUI>();

        ui.SetDeleteButton(true);
        ui.ShowMenuByName(fieldType + "Menu");
        float rotationVal = transform.localEulerAngles.y / 360;

        //teleMenu.SetActive(true);
        SetMenu(true);
        FindComponents();
        SetListeners();

        rotationText.text = (Mathf.Floor(transform.localEulerAngles.y)).ToString();
        rotationBar.value = rotationVal;
    }