I am very confused -_-
I read this question from some other people, and I understand what the error is trying to tell me, but all I did was eliminate a reference to one script that doesn’t even show up in the rest of the other script, and I get a host of these things…
The script that I edited isn’t even involved with these scripts!
Assets/Scripts/Rings/RingMaster.js(85,50): BCE0070: Definition of ‘RingMaster.CheckRings()’ depends on ‘EnemyCounter.EndWave()’ whose type could not be resolved because of a cycle. Explicitly declare the type of either one to break the cycle.
Assets/Scripts/Enemies/FlyThroughTimer.js(61,30): BCE0070: Definition of ‘FlyThroughTimer.ExitScreenEnemies()’ depends on ‘EnemyCounter.EndWave()’ whose type could not be resolved because of a cycle. Explicitly declare the type of either one to break the cycle.
The following 3 functions are from different scripts and correspond to the errors respectively:
function CheckRings(){
finalText = Instantiate( text, Vector3( 0.85, 0.5, 0 ), Quaternion.identity);
pickText( reportedRings );
finalText.fontSize = 90;
finalText.fontStyle = FontStyle.Italic;
StaticFunctions.FadeIn( finalText.gameObject, 0.0, 1.0, 1.0, false );
ship.AddEnergy( reportedRings*10 );
if( ringTotal == reportedRings ){
GameObject.Find("Master").GetComponent( PointTracker ).AddPoints( ( 500) );
}
ship.AddEnergy( reportedRings*2 );
Master.dodgingWave = false;
StartCoroutine( FadeAll( myText, myTotal, mySlash, finalText) );
camera.main.GetComponent( EnemyCounter ).EndWave();
}
divider
function ExitScreenEnemies(){
flyCount = 0;
spawner.ClearGrid();
var enemiesArray : Component[] = GetComponentsInChildren( Transform );
for( var u : Transform in enemiesArray ){
if( u.transform.Find("Gun")) u.transform.Find( "Gun" ).GetComponent( EnemyTargeting ).can_Shoot = false;
if( u.transform.GetComponent( EnemyMovement) ) u.GetComponent( EnemyMovement ).ExitScreen();
}
enemyCounter.EndWave();
enemyCounter.screenEmpty = true;
}
And the EndWave function:
function EndWave(){
GameObject.Find( "EnemyGrid" ).GetComponent( FlyThroughTimer ).countDown = false;
hud.Fade( 1.0, 0.0, 1.5, false );
Instantiate( endWaveDisplay, Vector3(0,0,0 ), Quaternion.identity );
yield WaitForSeconds( 2.0 );
endWaveUp = true;
}
What’s up???
Thanks! - YA