void mRun() { if (m_state != eState.eRun) { return; } if (!m_isSet && m_disaster.mIsEnd()) { m_disasterTimeCount += Time.deltaTime; } // if (!m_isDisasterStart && !m_isSet && m_disasterTimeCount > m_disasterTime && m_disaster.mIsEnd()) { m_time = m_telopTime.mGetRandam(); int randam = UnityEngine.Random.Range(0, 4); m_nextType = mGetDisaster(randam); m_telop.mSetProperty(mGetDisaterTypeToString(m_nextType), m_time.ToString()); m_telop.mAccident(); m_isDisasterStart = true; } // if (m_telop.IsEnd && m_isDisasterStart) { m_timeCount += Time.deltaTime; } // if (!m_isSet && m_timeCount > (m_time / 2)) { m_disaster.mNextSet(m_nextType, m_disasterTimeHash[m_nextType]); m_isSet = true; } // if (m_isDisasterStart && m_timeCount > m_time) { m_disaster.mNextStart(); m_timeCount = 0; m_isDisasterStart = false; m_isSet = false; m_disasterTimeCount = 0.0f; m_disasterTime = UnityEngine.Random.Range(StartRangeMin, StartRangeMax); } }
string mGetDisaterTypeToString(DisasterManager.DisasterType type) { switch (type) { case DisasterManager.DisasterType.eEarthquake: return("地震"); case DisasterManager.DisasterType.eFlood: return("洪水"); case DisasterManager.DisasterType.eThunder: return("雷"); case DisasterManager.DisasterType.eTyphoon: return("台風"); case DisasterManager.DisasterType.eEruption: return("噴火"); } return("エラー"); }