// Start is called before the first frame update void Start() { m_my_Pauser = pauserScript.pauser_Instance; rb = GetComponent <Rigidbody2D>(); if (GetComponent <Animator>() != null) { anim = GetComponent <Animator>(); } else { anim = null; } //making the player face a certain way if (makeFaceRight) { xScale = -gameObject.transform.localScale.x; } else { xScale = gameObject.transform.localScale.x; } //this isn't working properly since it makes the player go back down to 0 in between frames StartCoroutine(CalcVelocity()); healthAnim = healthBar.GetComponent <Animator>(); }
//-------------------------------------------------------------------------------------------------- // Start is called before the first frame update void Start() { myMachine = null; m_my_Pauser = pauserScript.pauser_Instance; status = Status.Free; myPlayer = ReInput.players.GetPlayer(playerNum - 1); ReInput.ControllerConnectedEvent += OnControllerConnected; CheckController(myPlayer); }
// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); healthAnim = healthBar.GetComponent <Animator>(); m_my_Pauser = pauserScript.pauser_Instance; //making the player face a certain way if (makeFaceRight) { xScale = gameObject.transform.localScale.x; } else { xScale = -gameObject.transform.localScale.x; } player = playerState.FreeMovement; }
private void Awake() { pauser_Instance = this; }