protected override void Initialization() { base.Initialization(); movement = player.GetComponent <HorizontalMovement>(); topOfLadder = new Vector3(transform.position.x, platformCollider.bounds.max.y); bottomOfLadder = new Vector3(transform.position.x, platformCollider.bounds.min.y); platformCollider.isTrigger = true; }
//This is essentially the Start() method for all the child scripts of the Character script. protected virtual void Initialization() { gameFile = PlayerPrefs.GetInt("GameFile"); col = GetComponent <Collider2D>(); rb = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); movement = GetComponent <HorizontalMovement>(); jump = GetComponent <Jump>(); input = GetComponent <InputManager>(); objectPooler = ObjectPooler.Instance; aimManager = GetComponent <AimManager>(); weapon = GetComponent <Weapon>(); grapplingHook = GetComponent <GrapplingHook>(); dash = GetComponent <Dash>(); gameManager = FindObjectOfType <GameManager>(); facingLeft = new Vector2(-transform.localScale.x, transform.localScale.y); }