예제 #1
0
 // Use this for initialization
 void Awake()
 {
     handDraggingComp = gameObject.GetComponent <HandDragging>();
     handRotateComp   = gameObject.GetComponent <HandRotate>();
     handResizeComp   = gameObject.GetComponent <HandResize>();
     gameManagerComp  = GameObject.Find("Managers").GetComponent <GameManager>();
 }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        defaultShader = this.GetComponent <Renderer>().material.shader;
        x             = Shader.Find("Legacy Shaders/Self-Illumin/Bumped Diffuse");
        GameObject grandParent = this.gameObject.transform.parent.gameObject.transform.parent.gameObject;

        //Debug.Log(grandParent);
        rotateScript = grandParent.GetComponent <HandRotate>();
    }
예제 #3
0
    public override void Start()
    {
        base.Start();
        dragScript   = interactiveArea.GetComponent <HandDragging>();
        scaleScript  = interactiveArea.GetComponent <HandResize>();
        rotateScript = interactiveArea.GetComponent <HandRotate>();

        ActivateManipulation((int)ManipulationType.DRAG);
    }
예제 #4
0
        private void Start()
        {
            if (HostTransform == null)
            {
                HostTransform = transform;
            }

            mainCamera       = Camera.main;
            scriptHandRotate = this.GetComponent <HandRotate>(); //get script HandRotate
        }