void Start() { horde = FindObjectOfType <Horde>(); player = FindObjectOfType <PlayerMov>(); barriers = FindObjectsOfType <Barrier>(); checkDialogue(); }
void Start() { pMov = GetComponent <PlayerMov>(); playerN = pMov.playerN; estaEnPiso = true; playerRigidbody = GetComponent <Rigidbody>(); }
void Start() { playerAudio = GetComponent <AudioSource>(); saludActual = saludInicial; estaMuerto = false; playersAlive = GameObject.Find("World").GetComponent <PlayersAlive>(); playerMov = GetComponent <PlayerMov>(); }
void Start() { motor = GetComponent <PlayerMov>(); rb = GetComponent <Rigidbody>(); Cursor.lockState = CursorLockMode.Locked; }
float maxAngle = 50.0f; //Ángulo de giro máximo del ojo respecto a originalLook void Start() { originalLook = transform.forward; //Al inicio guardamos el vector forward (z) de la base geométrica del objeto if (first) { target = FindObjectOfType <PlayerMov>(); //Al inicio encuentra el jugador y guarda una referencia a él first = false; } }
// Use this for initialization void Start() { anim = GetComponent <Animator>(); controller = GetComponent <CharacterController>(); playerMovement = GetComponent <PlayerMov>(); playerStats = GetComponent <PlayerStats>(); playerStats.CurrentHealth = playerStats.MaxHealth; pAnims = GetComponent <playerAnim>(); }
void Start() { Havekey = false; boxUI = false; boxOC = false; ItemUI_Ch = false; hit = 0; slotGrit = FindObjectOfType <SlotGrit>(); Player_mov = GameObject.Find("Player"); pm = FindObjectOfType <PlayerMov>(); }
void Start() { originalPos = transform.position; playerAudio = GetComponent <AudioSource>(); saludActual = saludInicial; estaMuerto = false; playersAlive = GameObject.Find("World").GetComponent <PlayersAlive>(); playerMov = GetComponent <PlayerMov>(); materialRenderer = GetComponent <MeshRenderer>(); playerOriginalColor = materialRenderer.material.color; }
void Awake() { adultReference = adult; //Transmite si eres mayor de 13 o no a la horda de aliens y al jugador para cambiar su comportamiento PlayerMov player = FindObjectOfType <PlayerMov>(); player.adult = adult; player.bounce = bounce; FindObjectOfType <Horde>().adult = adult; }
// Use this for initialization void Start() { gameManager = gameManagerObject.GetComponent <GameManager>(); alive = 4; P1 = GameObject.Find("PlayerDonkey").GetComponent <PlayerHealth>(); P2 = GameObject.Find("PlayerDiddy").GetComponent <PlayerHealth>(); P3 = GameObject.Find("PlayerDixie").GetComponent <PlayerHealth>(); P4 = GameObject.Find("PlayerChunky").GetComponent <PlayerHealth>(); P1Hill = GameObject.Find("PlayerDonkey").GetComponent <PlayerMov>(); P2Hill = GameObject.Find("PlayerDiddy").GetComponent <PlayerMov>(); P3Hill = GameObject.Find("PlayerDixie").GetComponent <PlayerMov>(); P4Hill = GameObject.Find("PlayerChunky").GetComponent <PlayerMov>(); }
void Awake() { if (PlayerMov.instance == null) { instance = this; } if (instance != this) { Destroy(this); } myAnimation = GetComponent <Animator>(); }
void Update() { if (pm == null) { pm = gameObject.GetComponent <PlayerMov>(); } int playerNum = pm.playerNum; if (Input.GetButton("Player" + playerNum + "_Fire1") && Time.time > nextFire) { nextFire = Time.time + fireRate; CmdShoot(); } }
void Start() { //Se recogen los componentes necesarios del gameObject player = FindObjectOfType <PlayerMov>(); bc = gameObject.GetComponent <BoxCollider>(); rb = gameObject.GetComponent <Rigidbody>(); aliens = gameObject.GetComponentsInChildren <Alien>(); collision = GetComponent <AudioSource>(); hordeManager = FindObjectOfType <HordeManager>(); scoreManager = FindObjectOfType <ScoreManager>(); numberOfAliveAliens = aliens.Length; //Numero de aliens que están vivos initialNumberOfAliens = numberOfAliveAliens; initialiceAlienProperties(); randomizeAlienHeight(); calculateBoxCollider(); }
void Awake() { gameManager = gameManagerObject.GetComponent <GameManager>(); playerMov = GetComponent <PlayerMov>(); playerHealth = GetComponent <PlayerHealth>(); bm = GetComponent <BalasManager>(); acem = GameObject.Find("Suelo").GetComponent <ArmaChidaEnMapa>(); playerN = playerMov.playerN; arm = gameObject.transform.GetChild(0).gameObject; gun = gameObject.transform.GetChild(1).gameObject; bombRef = gameObject.transform.GetChild(2).gameObject; gunChida = gameObject.transform.GetChild(3).gameObject; gunRef = gun.gameObject.transform.GetChild(0).gameObject.transform; gunChidaRef = gunChida.transform.GetChild(2).gameObject.transform; }
//box関連 public void Box_UI() { PlayerMov pm = GetComponent <PlayerMov>(); if (boxUI && hit == 1 || doorUI && hit == 2) { TextUI.gameObject.SetActive(true); } else if (!boxUI && hit == 0 || !doorUI && hit == 0) { TextUI.gameObject.SetActive(false); } if (Input.GetKeyDown("space") && !boxOC && hit == 1) { boxOC = true; ItemUI_Ch = true; pm.mouse_O(); slotGrit.HitBox = true; slotGrit.BoxInventory(); } else if (Input.GetKeyDown("space") && boxOC && hit == 1) { boxOC = false; ItemUI_Ch = false; slotGrit.HitBox = false; pm.mouse_C(); } if (boxOC) { pm.speed = 0; Item_ch(); inBox_tr(); } else if (!boxOC) { pm.speed = 3; Item_ch(); outBox(); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Return) | Input.GetKeyDown("joystick 1 button 7") | Input.GetKeyDown("joystick 2 button 7") | Input.GetKeyDown("joystick 3 button 7") | Input.GetKeyDown("joystick 4 button 7")) { SceneManager.LoadScene("MenuPrincipal"); } if (SceneManager.GetActiveScene().name != "Character") { if (SceneManager.GetActiveScene().name == "MenuPrincipal") { //asignado = false; } else { //StartCoroutine(Reiniciando()); if (asignado == false) { if (SceneManager.GetActiveScene().name == "Loading") { } else { Time.timeScale = 0; for (int i = 0; i < 4; i++) { PlayerMov actual = null; actual = GameObject.Find(names[i]).GetComponent <PlayerMov>(); Debug.Log(actual); actual.playerN = character[i]; } asignado = true; Time.timeScale = 1; } } } } }
//Este nos indica que al momento de colisionar con un objeto con la denominacion de su tag, se le restara vida al enemigo, destruyendolo junto con la bala private void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Bola") { VidaEnemigo--; if (VidaEnemigo <= 0) { Destroy(other.gameObject); UIScore.ActualizarScore(); Destroy(this.gameObject); } } //Este nos indica que al momento de colisionar con el jugador, este le restara vida al jugador y se destruira if (other.tag == "Player") { PlayerMov P1 = other.GetComponent <PlayerMov>(); if (P1 != null) { P1.Damage(); } Destroy(this.gameObject); } }
private void Awake() { _player = FindObjectOfType <PlayerMov>(); _spawner = FindObjectOfType <PowerUpSpawner>(); _sfx = FindObjectOfType <SFXManager>(); }
// Use this for initialization void Start() { levelmanager = FindObjectOfType <Levelmanager>(); PlayerVar = FindObjectOfType <PlayerMov>(); }
// Use this for initialization public void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMov>(); Render = GetComponent <SpriteRenderer>(); StartCoroutine("boss"); }
// Start is called before the first frame update void Start() { pm = FindObjectOfType <PlayerMov>(); button.SetActive(false); }
private void Start() { player = FindObjectOfType <PlayerMov>(); GetComponent <Dialogue>().cantalk = false; }
private void Awake() { _player = FindObjectOfType <PlayerMov>(); }
// Start is called before the first frame update void Start() { _playerMov = FindObjectOfType <PlayerMov>(); coinText.text = "Score : " + coins; }
// Start is called before the first frame update void Start() { enemies = GameObject.FindObjectsOfType <EnemyMov>(); canvas = GameObject.FindGameObjectWithTag("Canvastag"); player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMov>(); }