private void OnCollisionEnter(Collision collision) { GameObject _hitObject = collision.gameObject; if (_hitObject.CompareTag("ChocoBall") && !statics.useInvincibleSphere()) { PlayerStatics.Player _p = _hitObject.GetComponent <ChocoStatics>().ownPlayer; if (_p != statics.playerTag) { HitProcess(_hitObject); } } }
// 無敵時間処理 void InvincibleProc() { stat.nowInvincibleTime -= Time.deltaTime; invincibleSphere.enabled = stat.useInvincibleSphere(); }