public void SwitchFireMode(Ship.eMotherShip eMotherShipType) { switch (eMotherShipType) { case Ship.eMotherShip.BASIC: fireType = eFireType.BASIC; break; case Ship.eMotherShip.FLAMETHROWER: fireType = eFireType.FLAMETHROWER; break; case Ship.eMotherShip.LIGHTNING: fireType = eFireType.LIGHTNING; break; case Ship.eMotherShip.HEALING: fireType = eFireType.HEALING; break; case Ship.eMotherShip.GUARD_DRONE: fireType = eFireType.GUARD_DRONE; break; } }
public new void Open() { base.Open(); AudioManager.Instance.Play("ShopEntrance"); AudioManager.Instance.StopAll(); AudioManager.Instance.PlayRandomMusic("Shop"); CurrentMothership = MotherShip.GetComponent <Ship>().motherShip; ShipyardShipSetup(); ShipyardMotherSetup((int)CurrentMothership, false); MothershipPanelSwap(true); }
public SaveData() { PlayerHealth = 100; PlayerMoney = 100; motherShipType = Ship.eMotherShip.BASIC; items = new ItemPair[0]; Ships = new ShipDataSavable[0]; CurrentWave = 0; CurrentCycle = 1; PlayerPosition = new Vec3(); PlayerFuelMax = 4; PlayerFuelCurrent = 4; VisitedTeleports = new string[0]; shipyards = new ShipyardMotherships[0]; }
public void Start() { MotherShip = WorldManager.Instance.Ship; foreach (LoadManager.ShipyardMotherships s in LoadManager.Instance.saveData.shipyards) { if (s.shipyardID == ShipyardId) { CurrentMothership = (Ship.eMotherShip)s.mothershipEnum; } } ShipyardShipSetup(); ShipyardShopSetup(); MothershipPanelSwap(true); ShipyardMotherSetup((int)CurrentMothership, false); ShipMenu.SetActive(false); ShopMenu.SetActive(false); SelectionDisplay.SetActive(false); buyButton = SelectionDisplay.GetComponentsInChildren <Button>().Where (o => o.name == "Buy").FirstOrDefault(); sellButton = SelectionDisplay.GetComponentsInChildren <Button>().Where (o => o.name == "Sell").FirstOrDefault(); }
public void TradeIn() { int tradeInValue = Motherships[(int)TradeInMothership].Price; if (WorldManager.Instance.PlayerController.RemoveMoney(tradeInValue)) { Ship.eMotherShip temp = MotherShip.motherShip; MotherShip.SetShipHead((int)TradeInMothership); CurrentMothership = TradeInMothership; TradeInMothership = temp; AndroidManager.HapticFeedback(); ShipyardMotherSetup((int)TradeInMothership, false); MothershipPanelSwap(true); } else { // You don't have enough money >:C } }