public void IsWaveEnd() { if (0 == m_CharInScene.m_listMonster.Count) { SpawnHandler.GetInst().ReleaseNextWave(); } }
private static void SetMonsterData(CharHandler charHandler) { int lv = SpawnHandler.GetInst().CurSpawnIndex * 10 + SpawnHandler.GetInst().CurWave; CharData charData = charHandler.m_CharData; charData.m_eSide = BattleEnum.Enum_CharSide.Enemy; charData.m_eType = BattleEnum.Enum_CharType.Monster; ConfigRow monsterInfo = ConfigData.GetValue("Monster_Client", charData.m_iCharID.ToString()); charData.m_fAtkX = float.Parse(monsterInfo.GetValue("AttackX")); charData.m_fAtkRange = float.Parse(monsterInfo.GetValue("AtkRange")); charData.m_fBodyRange = float.Parse(monsterInfo.GetValue("BodyRange")); charData.m_fMoveSpeed = float.Parse(monsterInfo.GetValue("MoveSpeed")); charData.CurAttack = float.Parse(monsterInfo.GetValue("Attack")) * (1 + 0.2f * lv); charData.OriAtk = charData.CurAttack; charData.CurDefence = float.Parse(monsterInfo.GetValue("Defence")) * (1 + 0.2f * lv); charData.OriDef = charData.CurDefence; charData.CriticalRatio = float.Parse(monsterInfo.GetValue("CriticalRatio")); charData.BlockRatio = float.Parse(monsterInfo.GetValue("BlockRatio")); charData.MaxHP = float.Parse(monsterInfo.GetValue("Hp")) * (1 + 0.2f * lv); charData.CurHP = charData.MaxHP; charData.OriHP = charData.MaxHP; charData.CurStar = BattleManager.GetInst().m_iEnemyPlayerLevel; charHandler.m_CharDefence.m_fBackwardClock = 0; }
public CharHandler AddHero(int heroId, int heroLv, int heroIndex) { CharHandler h = SpawnHandler.GetInst().CreateHeroM(heroId, heroIndex); h.EnableChar(); BattleHeroListPanel.GetInst().InsertBattleHero(heroId, heroLv, heroIndex); return(h); }
private void OnDestroy() { _inst = null; }
private void Awake() { _inst = this; }