/** * -the group CURRENTLY in the waiting area will be activated. * - nextNextGroup is the group that will be put in the waiting area * * @returns FALSE if game over (newly activated group collided immediately within the playing field) */ public bool ActivateNextGroup(ActiveGroupController nextNextGroup) { Debug.Log("Player.ActivateNextGroup"); //the one to activate was already created: theActiveGroup = theNextGroup; theActiveGroup.transform.position = GroupStartPosition.position; theActiveGroup.transform.rotation = GroupStartPosition.rotation; if (theActiveGroup.isColliding()) { Destroy(theActiveGroup.gameObject); GameOver(); return(false); } //now create the one in the waiting area: theNextGroup = nextNextGroup; //initialization: theActiveGroup.StartFalling(this.playingField, this.playerNr, this.fallDelay); return(theActiveGroup); }
public void SetNextGroup(ActiveGroupController ng) { theNextGroup = ng; }