//-------------------------------------------------------------------------------------------- void Start() { mSavedGameManager = SavedGameManager.createOrLoadSavedGameManager(gmPrefab).GetComponent<SavedGameManager>(); //if the current game ptr is somehow bad, return to the main menu if(mSavedGameManager.getCurrentGame() == null) { Debug.Log("ERROR: CURRENT GAME PTR NULL -- LOADING MAIN MENU"); SceneManager.LoadScene((int)SceneIndex.MAIN_MENU); return; } //init resource arrays buttonSprites = Resources.LoadAll<Sprite>("GUI_Assets/Menu_Loadouts"); iconSprites = Resources.LoadAll<Sprite>("GUI_Assets/LoadoutIcons_new"); elementStrings = new string[16, 3] //name, description, unlock { {"Exterminator", "Standard issue chassis. Takes 3 hits.", "-"}, {"Final", "Breaks after a single hit, but radiates a mysterious energy...", "Complete Tutorial 3 to unlock!"}, {"Booster", "Slower than the Exterminator, but Precision gives you a speed boost.", "Complete Level 1-1 to unlock!"}, {"Shrink", "Slower than the Exterminator, but your hitbox in Precision is SMALL.", "Complete Level 2-2 to unlock!"}, {"Quick", "Quicker but weaker than the Exterminator. Secondaries recharge faster.", "Complete Level 3-3 to unlock!"}, {"Bug Repellants", "Standard issue anti-bug bullets.", "-"}, {"No-Miss Swatter", "Fire and forget! Automatically attacks the nearest enemy.", "Complete Tutorial 2 to unlock!"}, {"Precision Pesticide", "Laser that sweeps from side to side as you move.", "Complete Level 1-2 to unlock!"}, {"Citronella Flame", "Shoots a short, but powerful cone of fire.", "Complete Level 2-1 to unlock!"}, {"Volt Lantern", "Powerful forward and rear facing lasers.", "Complete Level 3-2 to unlock!"}, {"EMP Counter", "Disrupts enemy firing systems and clears the area of bullets.", "-"}, {"Phasing System", "Renders your ship invulnerable for a short time.", "Complete Tutorial 1 to unlock!"}, {"Holo-Duplicate", "Deploys a hologram of your ship that enemies attack instead.", "Complete Level 1-3 to unlock!"}, {"Mosquito Tesla Coil", "Hold to absorb bullets. Release to send damage back. Does not recharge!", "Complete Level 2-3 to unlock!"}, {"Freeze Ray", "Starts a chain reaction that freezes nearby enemy bullets.", "Complete Level 3-1 to unlock!"}, {"-", "-", "-"} }; //sanity check -- null any current loadout data on the current game ptr mSavedGameManager.getCurrentGame().setCurrentLoadout(null); mCurrentLoadout = new Loadout(); //initialize the default loadout mCurrentLoadout.setChasis(Loadout.LoadoutChasis.EXTERMINATOR); mCurrentLoadout.setPrimary(Loadout.LoadoutPrimary.REPEL); mCurrentLoadout.setSecondary(Loadout.LoadoutSecondary.EMP); //init menu as though chassis button has been clicked chassisButton.Select(); handleChassisButtonClicked(); StartCoroutine(mScreenFader.FadeFromBlack()); StartCoroutine(handleIconAnimation()); }