// ------------------- FUNCOES UNITY ------------------- // private void Start() { // Inicializa rigidBody2D = this.GetComponent <Rigidbody2D>(); animator = this.GetComponent <Animator>(); spriteRenderer = this.GetComponent <SpriteRenderer>(); playerRevisao = FindObjectOfType(typeof(PlayerRevisao)) as PlayerRevisao; gameControllerRevisao = FindObjectOfType(typeof(GameControllerRevisao)) as GameControllerRevisao; // Desabilita objetos ballonAlert.SetActive(false); // Muda posicao if (isLookingLeft) { Flip(); } // Chama funcoes Material material = (isOnDark ? gameControllerRevisao.light2D : gameControllerRevisao.default2D); ChangeMaterial(material); ChangeState(initialState); ChangeWeapon(weaponID); }
// ------------------- FUNCOES UNITY ------------------- // private void Start() { // Pegando components animator = this.GetComponent <Animator> (); rigidBody2D = this.GetComponent <Rigidbody2D> (); spriteRenderer = this.GetComponent <SpriteRenderer> (); gameControllerRevisao = FindObjectOfType <GameControllerRevisao>(); audioControllerRevisao = FindObjectOfType <AudioControllerRevisao>(); // Inicializa parametros maxLife = gameControllerRevisao.playerMaxLife; weaponID = gameControllerRevisao.weaponID; actualLife = maxLife; gameControllerRevisao.playerActualMana = gameControllerRevisao.playerMaxMana; // Desabilita armas, arcos, e staffs foreach (GameObject weapon in weapons) { weapon.SetActive(false); } foreach (GameObject bow in bows) { bow.SetActive(false); } foreach (GameObject staff in staffs) { staff.SetActive(false); } ChangeWeapon(weaponID); }
// ------------------- FUNCOES UNITY ------------------- // private void Start() { // Recupera instancias - Components spriteRenderer = this.GetComponent <SpriteRenderer> (); animator = this.GetComponent <Animator>(); // Recupera instancias - Objetos gameControllerRevisao = FindObjectOfType(typeof(GameControllerRevisao)) as GameControllerRevisao; playerRevisao = FindObjectOfType <PlayerRevisao>(); audioControllerRevisao = FindObjectOfType(typeof(AudioControllerRevisao)) as AudioControllerRevisao; // Define configuracoes actualLife = maxLife; lifebarHolder.SetActive(true); lifebarHolder.transform.localScale = new Vector3(1, 1, 1); // Passa valores DamageTypeValues[0] = 1; DamageTypeValues[1] = 5; DamageTypeValues[2] = 0; // Define escala x do Sprite if (isLookingLeft) { Flip(false); } }
// ------------------- FUNCOES UNITY ------------------- // private void Start() { gameControllerRevisao = FindObjectOfType(typeof(GameControllerRevisao)) as GameControllerRevisao; LoadSprites(); LoadXML(); LoadWeaponSprites(); RefreshGameController(); }
private void Start() { // Inicializa gameControllerRevisao = FindObjectOfType(typeof(GameControllerRevisao)) as GameControllerRevisao; // Desabilita paineis npcCanvas.SetActive(false); answerPanel.SetActive(false); LoadXML(); }
// ------------------- FUNCOES UNITY ------------------- // private void Start() { // Inicializa gameControllerRevisao = FindObjectOfType <GameControllerRevisao>(); painelItemInfoRevisao = FindObjectOfType <PainelItemInfoRevisao>(); audioControllerRevisao = FindObjectOfType <AudioControllerRevisao>(); // Proprio botao do slot Button btn = this.GetComponent <Button>(); btn.onClick.AddListener(UseItem); }
// ------------------- FUNCOES UNITY ------------------- // private void Start() { // Inicializa spriteRenderer = this.GetComponent <SpriteRenderer>(); gameControllerRevisao = FindObjectOfType(typeof(GameControllerRevisao)) as GameControllerRevisao; // Atualiza spritesheet do player if (isPlayer) { spriteSheetName = gameControllerRevisao.spriteSheetTexture[gameControllerRevisao.playerID].name; } LoadSpriteSheet(); }
// ------------------- FUNCOES UNITY ------------------- // // Inicializa private void Start() { gameControllerRevisao = FindObjectOfType(typeof(GameControllerRevisao)) as GameControllerRevisao; playerRevisao = FindObjectOfType(typeof(PlayerRevisao)) as PlayerRevisao; // Desativa paineis manaPanel.SetActive(false); arrowPanel.SetActive(false); HPBox.SetActive(false); MPBox.SetActive(false); VerifyPlayerHUD(); // Posiciona caixas boxAPosition = boxARectTransform.anchoredPosition; boxBPosition = boxBRectTransform.anchoredPosition; }
// ------------------- FUNCOES UNITY ------------------- // // Inicializa private void Start() { gameControllerRevisao = FindObjectOfType(typeof(GameControllerRevisao)) as GameControllerRevisao; }
// Inicializa private void Start() { gameControllerRevisao = FindObjectOfType <GameControllerRevisao>(); }
// ------------------- FUNCOES UNITY ------------------- // // Inicializa private void Start() { efeitoFadeRevisao = FindObjectOfType <EfeitoFadeRevisao>(); gameControllerRevisao = FindObjectOfType <GameControllerRevisao>(); }
// ------------------- FUNCOES UNITY ------------------- // private void Start() { // Inicializa spriteRenderer = this.GetComponent <SpriteRenderer>(); gameControllerRevisao = FindObjectOfType(typeof(GameControllerRevisao)) as GameControllerRevisao; }