예제 #1
0
    // Use this for initialization
    void Start()
    {
        //Init controllers
        wiimote_start();

        //Turn off mouse pointer and set the cursorImage
        screenpointer                       = (GUITexture)Instantiate(baseGuiTexture);
        Screen.showCursor                   = false;
        screenpointer.texture               = cursorImage;
        screenpointer.color                 = Color.red;
        screenpointer.pixelInset            = new Rect(10, 10, 10, 10);
        screenpointer.transform.localScale -= new Vector3(1, 1, 0);

        //Set ref scripts
        raycastscript      = gameObject.GetComponent("RayCastScript") as RayCastScript;
        rotateScript       = gameObject.GetComponent("RotateScript") as RotateScript;
        scaleScript        = gameObject.GetComponent("ScaleScript") as ScaleScript;
        stackScript        = gameObject.GetComponent("StackScript") as StackScript;
        moveScript         = gameObject.GetComponent("MoveScript") as MoveScript;
        smoothCameraScript = gameObject.GetComponent("SmoothCameraScript") as SmoothCameraScript;
        verwijderScript    = gameObject.GetComponent("VerwijderScript") as VerwijderScript;
        selectieScript     = gameObject.GetComponent("SelectieScript") as SelectieScript;

        //Set initial values
        selectieScript.setSelectionmodeOn();
        selectieScript.playerCam = playerCam;
        modus = Modi.NAV_SEL;
    }
	// Use this for initialization
	void Start () {
		//selectieScript.lastGameObjectHit = null;
		lastHooveredGameObject = null;
	
		//Set ref script
		raycastscript = gameObject.GetComponent("RayCastScript") as RayCastScript;
		rotateScript = gameObject.GetComponent("RotateScript") as RotateScript;
		scaleScript = gameObject.GetComponent("ScaleScript") as ScaleScript;
		stackScript = gameObject.GetComponent("StackScript") as StackScript;
		moveScript = gameObject.GetComponent("MoveScript") as MoveScript;
		smoothCameraScript = gameObject.GetComponent("SmoothCameraScript") as SmoothCameraScript;
		verwijderScript = gameObject.GetComponent("VerwijderScript") as VerwijderScript;
		selectieScript = gameObject.GetComponent("SelectieScript") as SelectieScript;
		selectieScript.setSelectionmodeOn();
		selectieScript.playerCam = playerCam;
		
		//Turn off mouse pointer and set the cursorImage
		screenpointer = (GUITexture)Instantiate(baseGuiTexture);
		Screen.showCursor = false; 
		screenpointer.texture = cursorImage;
		screenpointer.color = Color.red;
		screenpointer.pixelInset = new Rect(-5, -5,10,10);
		screenpointer.transform.localScale -= new Vector3(1, 1, 0);
		
		modus = Modi.NAV_SEL;
	}
예제 #3
0
    // Use this for initialization
    void Start()
    {
        //Init controllers
        wiimote_start();

        //Turn off mouse pointer and set the cursorImage
        screenpointer = (GUITexture)Instantiate(baseGuiTexture);
        Cursor.visible = false;
        screenpointer.texture = cursorImage;
        screenpointer.color = Color.red;
        screenpointer.pixelInset = new Rect(10,10,10,10);
        screenpointer.transform.localScale -= new Vector3(1,1,0);

        //Set ref scripts
        raycastscript = gameObject.GetComponent("RayCastScript") as RayCastScript;
        rotateScript = gameObject.GetComponent("RotateScript") as RotateScript;
        scaleScript = gameObject.GetComponent("ScaleScript") as ScaleScript;
        stackScript = gameObject.GetComponent("StackScript") as StackScript;
        moveScript = gameObject.GetComponent("MoveScript") as MoveScript;
        smoothCameraScript = gameObject.GetComponent("SmoothCameraScript") as SmoothCameraScript;
        verwijderScript = gameObject.GetComponent("VerwijderScript") as VerwijderScript;
        selectieScript = gameObject.GetComponent("SelectieScript") as SelectieScript;

        //Set initial values
        selectieScript.setSelectionmodeOn();
        selectieScript.playerCam = playerCam;
        modus = Modi.NAV_SEL;
    }