IEnumerator BurstAll() { universalPlayingObject.DestroyMe(); for (int i = 0; i < ColumnManager.instance.gameColumns.Length; i++) { for (int j = 0; j < ColumnManager.instance.gameColumns[i].playingObjectsScriptList.Count; j++) { if ((PlayingObject)ColumnManager.instance.gameColumns[i].playingObjectsScriptList[j]) { if (((PlayingObject)ColumnManager.instance.gameColumns[i].playingObjectsScriptList[j]).name == horizontalPOName) { PlayingObject po = ((PlayingObject)ColumnManager.instance.gameColumns[i].playingObjectsScriptList[j]); if (po.brust == false) { po.specialObjectScript.AssignBrustToItsTarget(); yield return(new WaitForSeconds(.6f)); } } } } } print("1"); GameOperations.instance.RemoveBrustItems(); GameOperations.instance.Invoke("AddMissingItems", .1f); }
void PowerIsHorizontal() { int itemIndex = myPlayingObject.indexInColumn; for (int i = 0; i < ColumnManager.instance.gameColumns.Length; i++) { if (ColumnManager.instance.gameColumns[i].playingObjectsScriptList[itemIndex] != null) { PlayingObject po = (PlayingObject)ColumnManager.instance.gameColumns[i].playingObjectsScriptList[itemIndex]; po.AssignBurst("normal"); po.DestroyMe(); } } CreateEffect(); }
void PowerIsVertical() { int itemIndex = myPlayingObject.indexInColumn; for (int i = 0; i < myPlayingObject.myColumnScript.playingObjectsScriptList.Count; i++) { if (myPlayingObject.myColumnScript.playingObjectsScriptList[i] != null) { PlayingObject po = (PlayingObject)myPlayingObject.myColumnScript.playingObjectsScriptList[i]; po.AssignBurst("normal"); po.DestroyMe(); } } CreateEffect(); }