/* * Sets references to components on this Player game object or one of its children */ void LinkComponents() { bluePower = (BluePower)GetComponent <BluePower> (); redPower = (RedPower)GetComponent <RedPower> (); greenPower = (GreenPower)GetComponent <GreenPower> (); playerRGB = (RGB)playerGeo.GetComponent <RGB> (); inventory = (Inventory)GetComponent <Inventory> (); }
/* * Spawn the next lesson that the user hasn't seen. */ void SpawnNextLesson() { if (!GameManager.Instance.SAVE_LASER_LESSON_COMPLETE) { // Award them half full meters so that they can fill up on the // number of pickups we've placed. RedPower power = GameManager.Instance.player.redPower; power.AddPower(power.maxValue * 0.66f); SpawnSection(tutorialLessonLaser); } else if (!GameManager.Instance.SAVE_SHIELDS_LESSON_COMPLETE) { GreenPower power = GameManager.Instance.player.greenPower; power.AddPower(power.maxValue * 0.66f); SpawnSection(tutorialLessonShields); } else if (!GameManager.Instance.SAVE_SLOW_LESSON_COMPLETE || !GameManager.Instance.SAVE_TUTORIAL_COMPLETE) { BluePower power = GameManager.Instance.player.bluePower; SetBlueLessonSpeed(); power.AddPower(power.maxValue * 0.66f); SpawnSection(tutorialLessonSlow); } }
/* * Sets references to components on this Player game object or one of its children */ void LinkComponents() { bluePower = (BluePower)GetComponent<BluePower> (); redPower = (RedPower)GetComponent<RedPower> (); greenPower = (GreenPower)GetComponent<GreenPower> (); playerRGB = (RGB)playerGeo.GetComponent<RGB> (); inventory = (Inventory)GetComponent<Inventory> (); }