Пример #1
0
 protected virtual void InitAxis()
 {
     materialData     = Resources.Load <MaterialData>("ScriptableObjects/MaterialData");
     scaleToViewpoint = transform.parent.parent.GetComponent <ScaleToViewpoint>();
     root             = scaleToViewpoint.transform.parent.gameObject;
     gizmoController  = root.GetComponent <GizmoController>();
 }
Пример #2
0
    public void InitGizmo(GameObject gizmoObject, GameObject controlledObject)
    {
        Destroy(currentGizmo);
        currentGizmo = GameObject.Instantiate(gizmoObject, transform.position, transform.rotation);

        gizmoController = currentGizmo.GetComponent <GizmoController>();
        gizmoController.controlledObjects    = new GameObject[1];
        gizmoController.controlledObjects[0] = controlledObject;

        SetFrozenAxes(currentGizmo);
    }
Пример #3
0
    void Start()
    {
        if (!GetComponent <Renderer>())
        {
            return;
        }

        NormalColor  = GetComponent <Renderer>().material.color;
        HilightColor = new Color(NormalColor.r * 1.2f, NormalColor.g * 1.2f, NormalColor.b * 1.2f, 1f);
        GC           = (GizmoController)GameObject.Find("GizmoAdvanced").GetComponent("GizmoController");
        GC.Hide();
    }//Start
Пример #4
0
    private GizmoController m_gizmoController;                      //Gizmo控制器

    #endregion

    #region 反射成员

    /// <summary>
    /// 初始化
    /// </summary>
    void Start()
    {
        m_gizmoController = GizmoController.Instance;
        m_gizmoController.Hide();
    }