// 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; }
// 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; smoothCameraScript = gameObject.GetComponent("SmoothCameraScript") as SmoothCameraScript; //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; smoothCameraScript = gameObject.GetComponent("SmoothCameraScript") as SmoothCameraScript; //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() { //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; }
//[SerializeField] private RockFalling_Land RockFalling_Land_buffer; //private bool is_On_Jump; //private List<bool> is_On_Jumps_list; #endregion #region UnityMethods void Start() { #region INICIALISATION is_Player_Dead = false; is_hangedLandCut = false; is_started = false; is_strongLanding = false; is_run_zone_triggered = false; is_up_zone_triggered = false; is_crouch_zone_triggered = false; current_speed = forward_speed; index_of_current_landset = 0; collected_diamonds_num = 0; is_Acceleration_pressed_one_time = false; is_fall_pressed = false; //is_On_Jump = false; is_Running = false; is_diamond_picked = false; animator = GetComponent <UnityArmatureComponent>(); this_collider = GetComponent <Collider2D>() as BoxCollider2D; //is_on_direction_change = false; cameraMovementController = Camera.main.GetComponent <SmoothCameraScript>(); this_transform = transform; this_rb = GetComponent <Rigidbody2D>(); is_Grounded = true; is_Jumped = false; _reward_txt = reward_txt.GetComponent <Text>(); Shadow.SetActive(false); GO_UI.SetActive(false); GW_UI.SetActive(false); fireTurbin.SetActive(false); animator.animation.Play("idle"); //if (challenge_Controller == null) //{ // challenge_Controller = // GameObject.FindGameObjectWithTag("CHALLENGES_CONTROLLER").GetComponent<Challenge_Controller>(); //} if (SaveGame.Load <int>("DISTANCE") > 0) { distance_traveled = SaveGame.Load <int>("DISTANCE"); //DISTANCE } else { distance_traveled = 0f; } for (int i = 1; i < lands_sets.Length; i++) { lands_sets[i].SetActive(false); } foreach (var item in acceleration_UI) { item.SetActive(false); } foreach (var part in bodyParts) { part.GetComponent <PolygonCollider2D>().enabled = false; part.GetComponent <Rigidbody2D>().isKinematic = true; } if (SaveGame.Load <int>("SCORE") != 0) { total_score_num = SaveGame.Load <int>("SCORE"); } //foreach (var item in is_On_Jumps) //{ // is_On_Jumps_list.Add(item); //} #endregion //we can activate level using button AudioManager.instance.Stop("Running"); try { Vector2 newPosition = SaveGame.Load <Vector2>("POSITION"); if (newPosition != Vector2.zero) { transform.position = newPosition; } } catch { //to continue } //StartRunning(); }