void Start() { input = InputManager3.Instance; myRigidbody2D = GetComponent <Rigidbody2D>(); myCollider = GetComponent <BoxCollider2D>(); myAnimator = GetComponent <Animator>(); groundLayerMask = LayerMask.GetMask("Ground"); enemyLayerMask = LayerMask.GetMask("Enemy"); AttributeInitialize(); }
private void Awake() { if (Instance != null) { Destroy(gameObject); } Instance = this; DontDestroyOnLoad(gameObject); KeyInit(); }