//............................................................ //.................................................. * START * void Start() { GameObject m_PlayerObject = GameObject.FindGameObjectWithTag("Player"); m_Player = m_PlayerObject.GetComponent <PlayerMovement>(); GameObject m_CatchBoxObject = GameObject.FindGameObjectWithTag("CatchBox"); m_CatchBox = m_CatchBoxObject.GetComponent <CatchBox>(); m_TotalScoreText = GameObject.Find("TotalScore").GetComponent <Text>(); m_TotalScoreTextShadow = GameObject.Find("TotalScoreShadow").GetComponent <Text>(); m_NotifierText = GameObject.Find("NotifierText").GetComponent <Text>(); //Sets Network input netInput = GameManager.GameManagerInstance.gameObject.GetComponent <NetworkServerUI>(); if (m_PlayerEstablishedMaxSwingForce > 0) { m_SwingForceLevel_3 = (m_PlayerEstablishedMaxSwingForce - (m_PlayerEstablishedMaxSwingForce / 5)); m_SwingForceLevel_2 = (m_PlayerEstablishedMaxSwingForce - ((m_PlayerEstablishedMaxSwingForce / 2.5f))); m_SwingForceLevel_1 = (m_PlayerEstablishedMaxSwingForce - (m_PlayerEstablishedMaxSwingForce / 1.5f)); } //else, we need to reestablish the players strength, but for now let's just leave a default max below... if (m_PlayerEstablishedMaxSwingForce <= 0) { m_PlayerEstablishedMaxSwingForce = 3; } }
private void Start() { _catchBox = gameObject.GetComponent <CatchBox>(); _playerMoves.ThrowBoxDown += Throw; _catchBox.CaughtBox += Caught; }