// Use this for initialization void Start() { //_fs = GameObject.Find("FadePanel").GetComponent<FadeScript>(); _cf = GameObject.Find("Main Camera").GetComponent<CameraFixing>(); _respownPosition = transform.position; Init(); }
// 初期化処理 public void Init() { _isAllDead = false; _isClear = false; // コンポーネント取得 _rb = GetComponent <Rigidbody2D>(); _ff = GetComponent <FlashScript>(); _skill = GetComponent <Skill>(); _cf = GameObject.Find("Main Camera").GetComponent <CameraFixing>(); _animator = GetComponent <Animator>(); // ジャンプ判定の閾値設定 _jumpThreshold = 0.00001f; // 点滅時間の設定 _ff.SetFrashTime(_invincibleTime); //// フェード取得 //_fadeObj.SetActive(true); //_fade = _fadeObj.GetComponent<FadeScript>(); //_fadeObj.SetActive(false); // Unity 上の数字と同期 _paramater._maxHp = _maxHp; _paramater._jumpPower = _jumpPower; _paramater._runForce = _runForce; _paramater._runMaxSpeed = _runMaxSpeed; _paramater._healMP_PerSeconds = _healMP_PerSeconds; // 体力 _paramater._hp = _paramater._maxHp; // 無敵 _invincible = false; _cntInvincibleTime = 0; // 状態 _state = State.NONE; // 速度 _rb.velocity = new Vector2(0, 0); _cntTime = 0; }