// 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;
	}
Пример #2
0
    private void Start()
    {
        Screen.orientation = ScreenOrientation.Portrait;
        swipeInput         = GetComponent <SwipeControl>();

        anim         = cubeMesh.GetComponent <AnimationScript>();
        animEdgeFlag = false;
        isMoving     = false;

        rightRay   = Right.GetComponent <RayCastScript>();
        leftRay    = Left.GetComponent <RayCastScript>();
        forwardRay = Forward.GetComponent <RayCastScript>();
        backRay    = Back.GetComponent <RayCastScript>();
        downRay    = Down.GetComponent <RayCastScript>();

        RightRotation   = Vector3.back;
        LeftRotation    = Vector3.forward;
        ForwardRotation = Vector3.right;
        BackRotation    = Vector3.left;

        trigFlag        = false;
        rotateFlag      = false;
        atEdge          = false;
        destinationFlag = true;
        destination     = transform.localPosition;

        MazeOffset   = MazeSize / 2;
        DownStep     = MazeOffset / 4;
        mazeRotation = MazeBody.GetComponent <MazeBodyRotation>();

        Load();
    }
Пример #3
0
 void Start()
 {
     //Init scripts
     guiscript        = gameObject.GetComponent("SelectionGuiScript") as SelectionGuiScript;
     raycastscript    = gameObject.GetComponent("RayCastScript") as RayCastScript;
     lineRenderObject = playerCam.GetComponent("LineRenderer") as LineRenderer;
 }
Пример #4
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;
    }
Пример #5
0
    public static void ChangeHudText()
    {
        playerStats = GameObject.Find("SavePlayerStats").GetComponent <SavePlayerStats> ();
        player      = GameObject.FindWithTag("Player").GetComponent <RayCastScript>();    //get player main script

        //change hud text with the info on the current RANGED weapon
//		player.rangedWeaponText.text = playerStats.rangedWeaponName + "\n" + "Damage: " + playerStats.rangedDamage + "\n" + "Reload Time: " + playerStats.rangedAttackSpeed + "\n"
//			+ "Range: " + playerStats.rangedWeaponRange + "\n" + "Weapon Power: " + playerStats.rangedImpulse + "\n" + "Ammo Consume: " + playerStats.ammoConsume;

        //change hud text with the info on the current MELEE weapon
//		player.meleeWeaponText.text = "'" + playerStats.weaponName + "'" + "\n" + " Damage: " + playerStats.weaponDamage + "\n" + " AttackSpeed: " + playerStats.weaponAttackSpeed +
//			"\n" + "Weapon Power: " + playerStats.weaponImpulse;
    }
Пример #6
0
    void Start()
    {
        groundScript    = GameObject.Find("GroundTriggerCollider").GetComponent <GroundScript> ();
        scoreText       = GameObject.Find("score").GetComponent <ScoreTextScript> ();
        spawnObject     = GameObject.Find("Spawner").GetComponent <SpawnerScript> ();
        rayCasterScript = gameObject.GetComponent <RayCastScript> ();

        gameManager = GameObject.Find("GameManager").GetComponent <GameManagerScript> ();

        scoreManager = GameObject.Find("ScoreManager").GetComponent <ScoreManager> ();
        cam1         = GameObject.Find("MainCamera").GetComponent <Camera>();
        cam2         = GameObject.Find("SecondCamera").GetComponent <Camera>();
        // leaderBoardScript = GameObject.Find ("LeaderBoard").GetComponent<LeaderBoardScript> ();
    }
	// Use this for initialization
	void Start () {
		//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;
		
		//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);
	}
    // Use this for initialization
    void Start()
    {
        //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;

        //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);
    }
Пример #9
0
    private void Awake()
    {
        Spikes.EditorMode  = false;
        Screen.orientation = ScreenOrientation.Portrait;
        swipeInput         = GetComponent <SwipeControl>();

        anim = cubeMesh.GetComponent <AnimationScript>();

        rightRay   = Right.GetComponent <RayCastScript>();
        leftRay    = Left.GetComponent <RayCastScript>();
        forwardRay = Forward.GetComponent <RayCastScript>();
        backRay    = Back.GetComponent <RayCastScript>();
        downRay    = Down.GetComponent <RayCastScript>();


        RightRotation   = Vector3.back;
        LeftRotation    = Vector3.forward;
        ForwardRotation = Vector3.right;
        BackRotation    = Vector3.left;

        //destination = transform.localPosition;
        mazeRotation = MazeBody.GetComponent <MazeBodyRotation>();
    }
Пример #10
0
    private void Start()
    {
        isMoving = false;

        rightRay   = Right.GetComponent <RayCastScript>();
        leftRay    = Left.GetComponent <RayCastScript>();
        forwardRay = Forward.GetComponent <RayCastScript>();
        backRay    = Back.GetComponent <RayCastScript>();

        RightRotation   = Vector3.back;
        LeftRotation    = Vector3.forward;
        ForwardRotation = Vector3.right;
        BackRotation    = Vector3.left;

        trigFlag        = false;
        rotateFlag      = false;
        atEdge          = false;
        destinationFlag = true;
        destination     = transform.localPosition;

        MazeOffset   = MazeSize / 2;
        DownStep     = MazeOffset / 4;
        mazeRotation = MazeBody.GetComponent <MazeBodyRotation>();
    }
Пример #11
0
	void Start(){
		//Init scripts
		guiscript = gameObject.GetComponent("SelectionGuiScript") as SelectionGuiScript;
		raycastscript = gameObject.GetComponent("RayCastScript") as RayCastScript;
		lineRenderObject = playerCam.GetComponent("LineRenderer") as LineRenderer;
	}
Пример #12
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;
    }