private void Start() { if (m_rankingInGame == null) { m_rankingInGame = FindObjectOfType <RankingInGame>(); } if (m_crushPointManager == null) { m_crushPointManager = FindObjectOfType <CrushPointManager>(); } m_restrictionNum = DebugModeGame.GetProperty().m_debugMode ? DebugModeGame.GetProperty().m_debugPlayerNum - 1 : 6 - 1; }
// Use this for initialization void Start() { if (rankingInGame == null) { rankingInGame = FindObjectOfType <RankingInGame>(); if (rankingInGame == null) { Debug.LogError("RankingInGameがシーンに存在しません"); } } if (CrushPointManager == null) { CrushPointManager = FindObjectOfType <CrushPointManager>(); if (CrushPointManager == null) { Debug.LogError("CrushPointManagerがジーンに存在しません"); } } }
// Use this for initialization void Start() { m_crushPointManager = gameObject.GetComponent <CrushPointManager>(); }
// Use this for initialization void Start() { /* * // デフォルトの肌の色の数値を代入する * SaveColor = new Color(1.0f, 0.78f, 0.55f, 1.0f); * // 色が変わった状態でHumanが無くなるとMaterialが変更されてままになるので生成時に初期色入れておく * Hand_R.color = SaveColor; * Hand_L.color = SaveColor; * Calf_R.color = SaveColor; * Calf_L.color = SaveColor; */ m_state = EState.Init; m_hitReceivePlayerID = PlayerID; InputName[0] = "Horizontal_Player"; InputName[1] = "Vertical_Player"; InputName[2] = "A_Player"; InputName[3] = "B_Player"; InputName[4] = "X_Player"; InputName[5] = "Y_Player"; myInputManager = FindObjectOfType <MyInputManager>(); if (myInputManager == null) { Debug.LogError("MyInputManagerがシーンに存在しません"); } m_crushPointManager = FindObjectOfType <CrushPointManager>(); if (m_crushPointManager == null) { Debug.LogError("CrushPointManagerがシーンに存在しません。"); } // 手足伸ばすスクリプト m_extendAndShrink = GetComponent <PlayerExtendAndShrink>(); if (m_extendAndShrink == null) { Debug.LogError("PlayerExtendAndShrinkをアタッチしてください。"); } // 移動処理スクリプト m_moving = GetComponent <PlayerMoving>(); if (m_moving == null) { Debug.LogError("PlayerMovingをアタッチしてください。"); } // プレイヤーカメラスクリプト P_Camera = GetComponent <PlayerCamera>(); if (P_Camera == null) { Debug.LogError("PlayerCameraをアタッチしてください。"); } // 地面とのRayの処理スクリプト if (m_ray == null) { Debug.LogError("PlayerRayをセットしてください。"); } // パーツスケールのスクリプト m_parts = GetComponent <PartsScale>(); if (m_parts == null) { Debug.LogError("PartsScaleをアタッチしてください。"); } if (!DebugModeGame.GetProperty().m_debugMode) { return; } // デバッグモードONの時の設定 if (DebugModeGame.GetProperty().m_debugPlayerEnable) { m_state = EState.Idle; } if (DebugModeGame.GetProperty().m_controllerDisable) { myInputManager.joysticks[m_playerID - 1] = m_playerID; } }