コード例 #1
0
    public void ArrowFliping()
    {
        HotspotControl Arrow = FindObjectOfType <HotspotControl> ();

        if (Arrow.arrow)
        {
            Debug.Log(Arrow.gameObject.transform.GetChild(0).gameObject.transform.localEulerAngles.y + Arrow.gameObject.transform.GetChild(0).gameObject.name);
            if (Arrow.gameObject.transform.GetChild(0).gameObject.transform.localEulerAngles.y == 180)
            {
                Debug.Log("Flip");
                Arrow.gameObject.transform.GetChild(0).gameObject.transform.localRotation = new Quaternion(0, 0, 0, 0);
            }
            else
            {
                Arrow.gameObject.transform.GetChild(0).gameObject.transform.localRotation = new Quaternion(0, 180f, 0, 0);
            }
        }
    }
コード例 #2
0
    public void InfotextInput()
    {
        HotspotControl info = FindObjectOfType <HotspotControl> ();

        Debug.Log("Hotspot Control Object name" + info.gameObject.name);
        if (info.Info)
        {
            info.InfoText     = InfoTxt.text.ToString();
            info.InfoFontSize = int.Parse(InfoFontSize.text.ToString());
            Debug.Log(InfoTxt.text.ToString());
            info.InfoText   = InfoTxt.text.ToString();
            InfoTxtOBj      = info.gameObject.transform.GetChild(1).gameObject.GetComponent <Text> ();
            InfoTxtOBj.text = info.InfoText;
            InfoTxtOBj.gameObject.GetComponent <Text> ().fontSize = int.Parse(InfoFontSize.text.ToString());

            InfoTxt.gameObject.transform.parent.gameObject.SetActive(false);
        }
    }