private bool jumped = false; /*used for detecting if jump key was pressed (also used in ai)*/ void Awake() { _controller = GetComponent <CharacterController2D>(); _body = GetComponent <Rigidbody2D>(); _anim = transform.Find("Graphics").GetComponent <Animator>(); _graphics = transform.Find("Graphics").gameObject; /*useful for preventing things from flipping when character is facing left*/ _pathAgent = GetComponent <PathFollowingAgent>(); /*allow movement abilities to access character script*/ jump.setCharacter(this); _body.isKinematic = true; }
void Awake() { agent = GetComponent <PathFollowingAgent>(); }