void Awake() { photonView = gameObject.GetComponent <PhotonView>(); controller = GetComponent <Controller2D>(); triggerController = GetComponent <TriggerCollisionsController>(); //anim = GetComponent<Player2DAnimations>(); playerAnim = GetComponent <PlayerAnimController>(); bola = GameObject.FindWithTag("Futebol"); ballrb = bola.GetComponent <Rigidbody2D>(); bolaFutebol = bola.GetComponent <BolaFutebol>(); }
void Start() { controller = GetComponent <Controller2D>(); inputController = GetComponent <InputController>(); triggerController = GetComponent <TriggerCollisionsController>(); animations = GetComponent <PlayerMotoAnimation>(); pv = GetComponent <PhotonView>(); joyStick = FindObjectOfType <Joystick>(); playerGanhou = Resources.Load <BoolVariable>("PlayerGanhou"); playerGanhou.Value = false; gravity = -(2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2); maxJumpVelocity = Mathf.Abs(gravity * timeToJumpApex); minJumpVelocity = Mathf.Sqrt(2 * Mathf.Abs(gravity) * minJumpHeight); }
void Start() { frente.SetActive(false); photonView = gameObject.GetComponent <PhotonView>(); controller = GetComponent <Controller2D>(); triggerCollisions = GetComponent <TriggerCollisionsController>(); if (PhotonNetwork.InRoom) { isOnline = true; } else { isOnline = false; } }
void Start() { inputController = GetComponent <InputController>(); controller = GetComponent <Controller2D>(); triggerController = GetComponent <TriggerCollisionsController>(); playerAnimInfo = GetComponent <PlayerAnimInfo>(); pv = GetComponent <PhotonView>(); dogController = GetComponent <DogController>(); playerGanhou = Resources.Load <BoolVariable>("PlayerGanhou"); textoAtivo = Resources.Load <BoolVariable>("TextoAtivo"); CalculateJumpStats(); //Utilizado para fazer os sons dos passos tocarem InvokeRepeating("CallFootsteps", 0, 0.3f); playerGanhou.Value = false; if (moveSpeed.Value != 6) { moveSpeed.Value = 6; } }