// Destroys dead nodes from the NodeManager public void DestroyDeadNodes() { List <NumberNode> nodesToDestroy = new List <NumberNode>(); // Loop over each node and mark them for destruction foreach (NumberNode node in NodeManager.GetNodes()) { // If node is dead if (!node.alive) { // Mark node eligible for destruction nodesToDestroy.Add(node); ParticlesList.Add(node.transform.position); ScoreAdd.AddScore(10); nodeDestroyedAudio.ShouldPlay = true; } else { // If node is alive, but has reached the end of the gutter if (node.pathFollower.distanceTravelled >= node.pathFollower.pathCreator.path.length) { // Mark node eligible for destruction nodesToDestroy.Add(node); screenShake.CamShake(); healthController.RemoveLife(); GameStateManager.SwitchToMoveBack(); } } } // Destroy nodes that are eligible for destruction // (Do this afterwards to not mess with the array during the foreach loop) foreach (NumberNode node in nodesToDestroy) { ScoreAdd.SetFurthestDistanceTravelled(node.pathFollower.distanceTravelled); NodeManager.RemoveNode(node); Destroy(node.gameObject); } }
public void Pose() { switch (_Pose) { case PoseState.Pose_of_Turbulent_hawk: _score.AddScore(); break; case PoseState.Muay_thai: _score.AddScore(); break; case PoseState.Open_leg: _score.AddScore(); break; case PoseState.Chico: _score.AddScore(); break; case PoseState.The_Eiffel_Tower: _score.AddScore(); break; case PoseState.Banana: _score.AddScore(); break; case PoseState.F: _score.AddScore(); break; case PoseState.H: _score.AddScore(); break; case PoseState.J: _score.AddScore(); break; case PoseState.K: _score.AddScore(); break; case PoseState.N: _score.AddScore(); break; case PoseState.R: _score.AddScore(); break; case PoseState.U: _score.AddScore(); break; case PoseState.X: _score.AddScore(); break; case PoseState.Yoga_1: _score.AddScore(); break; case PoseState.Yoga_2: _score.AddScore(); break; case PoseState.Yoga_3: _score.AddScore(); break; case PoseState.Bodybuilding: _score.AddScore(); break; case PoseState.Frog: _score.AddScore(); break; case PoseState.Gymnastics: _score.AddScore(); break; case PoseState.Exit: _score.AddScore(); break; case PoseState.Sophomoric_1: _score.AddScore(); break; case PoseState.Sophomoric_2: _score.AddScore(); break; case PoseState.Conveni: _score.AddScore(); break; case PoseState.Yell: _score.AddScore(); break; case PoseState.Bend_forward: _score.AddScore(); break; case PoseState.Sprawled: _score.AddScore(); break; case PoseState.Race_walking: _score.AddScore(); break; case PoseState.Joy: _score.AddScore(); break; case PoseState.Deformed: _score.AddScore(); break; } }