public void SetDistanceArrayIndex() { if (objectDistanceArray.Length != fusionManager.GetUnitNum()) { objectDistanceArray = new float[fusionManager.GetUnitNum()]; } if (enemyObjectDistanceArray.Length != fusionManager.GetEnemyUnitNum()) { enemyObjectDistanceArray = new float[fusionManager.GetEnemyUnitNum()]; } }
void Start() { gameManager = GameManager.Instance; fusionManager = FindObjectOfType <FusionManager>(); stageManager = FindObjectOfType <StageManager>(); mapSliderScript = FindObjectOfType <MapSliderScript>(); audi = GetComponent <AudioSource>(); anim = GetComponent <Animator>(); int enemyUnitNum = fusionManager.GetEnemyUnitNum() + 1; fusionManager.SetEnemyUnitNum(enemyUnitNum); firstHeart = heart; firstDp = dp; spawnStrongestNum = Random.Range(0, strongestSpawned.Length); for (int i = 0; i < gameManager.GetSaveData().currentStage; i++) { setStat(); } SetMaxHealth(); }
private void PlusEnemyNum() { fusionManager.SetEnemyUnitNum(thisUnitNum = fusionManager.GetEnemyUnitNum() + 1); fusionManager.SetEnemyUnitNO(thisUnitNO = fusionManager.GetEnemyUnitNO() + 1d); }