// Use this for initialization void Start() { //инициализация nB_GUI = GameObject.FindObjectOfType(typeof(ButtonGUI)) as ButtonGUI; nCam = GameObject.FindObjectOfType(typeof(cam)) as cam; nMain = GameObject.FindObjectOfType(typeof(main)) as main; }
// Use this for initialization void Start() { Select_Settings("0"); nCurs = GetComponent <Curs>(); nCam = GameObject.FindObjectOfType(typeof(cam)) as cam; nMain = GameObject.FindObjectOfType(typeof(main)) as main; }
void Start() { isKey = false; cam = FindObjectOfType(typeof(cam)) as cam; scoreMoedas = 0; qtdVidas = 3; walkSpeed = maxSpeed; }
void Start() { isKey = false; cam = FindObjectOfType(typeof(cam)) as cam; scoreMoedas = 0; qtdVidas = 3; pause.enabled = false; walkSpeed = maxSpeed; lifeCtrl = GetComponent <lifeController> (); }
void Start() { if (transform.name == "Thomas") { actif = true; // color = new Color(0.831f, 0.257f, 0.275f, 1.000f); color = new Color(0.830f, 0.273f, 0.273f, 1.000f); } if (transform.name == "John") { color = new Color(0.702f, 0.608f, 0.255f, 1.000f); } if (transform.name == "Claire") { color = new Color(0.149f, 0.243f, 0.369f, 1.000f); } mcam = Camera.main.GetComponent <cam>(); rb = GetComponent <Rigidbody2D> (); }
public void setCam(string newCam) { if (newCam == "main") { Cam = cam.main; Panel[1].transform.position = UIpos[1].position; Panel[0].transform.position = UIpos[0].position; Panel[0].SetActive(true); StartCoroutine("DisablePanel", Panel[1]); } else if (newCam == "level") { Cam = cam.level; Panel[0].transform.position = UIpos[1].position; Panel[1].transform.position = UIpos[0].position; Panel[1].SetActive(true); StartCoroutine("DisablePanel", Panel[0]); } }
// Use this for initialization void Start() { nCurs = GetComponent <Curs>(); nCam = GameObject.FindObjectOfType(typeof(cam)) as cam; }
private void Start() { playerManager = FindObjectOfType <PlayerManager>(); audioSource = GetComponent <AudioSource>(); cameraCtrl = FindObjectOfType <cam>(); }
void Update() { cam = GetComponentInChildren <cam>(); camObj = GetComponentInChildren <camObj>(); player = GetComponentInChildren <actions>(); float moveX = Input.GetAxis("Horizontal"); float moveY = Input.GetAxis("Vertical"); float RotX = Input.GetAxis("Mouse X"); float RotY = Input.GetAxis("Mouse Y"); mx = Mathf.Clamp(moveX, -1, 1); my = Mathf.Clamp(moveY, -1, 1); rx = Mathf.Clamp(RotX, -1, 1); ry = Mathf.Clamp(RotY, -1, 1); //move player player.Move(mx * 10, rx * 3, my * 10, moveSpd); //subtract stamina, then health when moving if (mx != 0 || my != 0) { if (stmn > 0) { stmn -= subfac.x; } else { hlth -= subfac.y; } } //move camera if (ry > 0.3 || ry < -0.3) { camObj.CamRot(ry * 3, moveSpd); } if (rx > 0.3 || rx < -0.3) { player.Move(0, rx * 3, 0, moveSpd); } //jump if (Input.GetButtonDown("Jump")) { if (jumpOk) { player.Jump(jumpStr); jumpOk = false; } } //shoot if (Input.GetButtonDown("Fire2")) { if (ammo > 0) { cam.Shoot(); ammo--; } } }
void Start() { cm = GetComponent <cam> (); anim = GetComponent <Animator> (); PathRequestManager.RequestPath(transform.position, target.position, OnPathFound); }