public IEnumerator ReSpawnMonster(GameObject monster) { EnemyAStar enemyAstar = monster.GetComponent <EnemyAStar>(); enemyAstar.JustInitPosition(enemyAstar.spawnx, enemyAstar.spawny); yield return(new WaitForSeconds(15f)); monster.SetActive(true); yield return(null); }
GameObject EnemyPowerAdjustment() { GameObject upgraded = enemy; EnemyAStar eStar = (EnemyAStar)upgraded.GetComponent(typeof(EnemyAStar)); EnemyHealth eHealth = (EnemyHealth)upgraded.GetComponent(typeof(EnemyHealth)); eStar.moveSpeed = (float)1.00f * (1.00f + (enemyPower / 3)); eHealth.UnitHealth = 45 * (1.00f + (enemyPower / 5)); eHealth.FullHealth = 45 * (1.00f + (enemyPower / 5)); return(upgraded); }