void Awake() { if (_instance == null) { _instance = this; } }
void OnDestroy() { if (_instance == this) { _instance = null; } }
//Awake private void Awake() { //取得 _rigid = GetComponent <Rigidbody2D>(); _anim = GetComponent <Animator>(); _transition = GetComponent <PlayerTransition>(); _transition_Beetle = GetComponent <PlayerTransitionRidingBeetle>(); _jump = GetComponent <PlayerJump>(); _attack = GetComponent <PlayerAttack>(); _kick = GetComponent <PlayerKick>(); _squat = GetComponent <PlayerSquat>(); _shoot = GetComponent <PlayerShoot>(); _getting_On_Beetle = GetComponent <PlayerGettingOnBeetle>(); input = InputManager.Instance; collection_Manager = CollectionManager.Instance; default_Gravity = _rigid.gravityScale; }