Esempio n. 1
0
    // Start is called before the first frame update
    public void LoadStore(ShipComponentManager shipManager)
    {
        var part1 = components.items.Where(p => shipManager.CanEquip(p)).Random();

        partStages[0].WireUp(part1, shipManager);
        var part2 = components.items.Where(p => p != part1 && shipManager.CanEquip(p)).Random();

        partStages[1].WireUp(part2, shipManager);
        var part3 = components.items.Where(p => p != part1 && p != part2 && shipManager.CanEquip(p)).Random();

        partStages[2].WireUp(part3, shipManager);
        var part4 = components.items.Where(p => p != part1 && p != part2 && p != part3 && shipManager.CanEquip(p)).Random();

        partStages[3].WireUp(part4, shipManager);
    }
Esempio n. 2
0
 public void Purchase()
 {
     if (realShip.CanEquip(component))
     {
         isPurchased = true;
         realShip.AddShipComponent(component);
         buyText.text       = "Purchased";
         cookieTotal.Value -= component.cost;
     }
 }