private void HandleOnTap(Vector3 position) { switch (mGameStatus) { case State.TapToStart: Paused = false; mGameStatus = State.Level; break; case State.Level: case State.Boss: //The 1+ thingy is a little fragile, because it relies on a relationship between the 2 enums Fire((Bullet.Type)(1 + DisplayInventory.ButtonAt(new Vector2(position.x, position.y)))); break; case State.GameOver: if (Time.timeSinceLevelLoad - mGameOverTime > WaitTime) { Reset(); Paused = false; mGameStatus = State.Level; //In the absolutely improbable event that the user died during the tutorial mCurrentDifficulty.TriggerTutorial(1); } break; } }
// Start is called before the first frame update private void Start() { ItemPrefab = Resources.Load <GameObject>("Prefabs/UI/UI Inventory Item"); Character = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); Character.Inventory.OnChange += UpdateView; _instance = this; gameObject.SetActive(false); }
public void RunUserModule() { Console.Clear(); while (option != exitValue) { DisplayUserMenu(); Console.Write("\nChoose an option: "); input = Console.ReadLine(); bool result = Int32.TryParse(input, out option); if (result) { switch (option) { case 1: Console.Clear(); DisplayInventory.ListInventory(); break; case 2: //Console.WriteLine("CREATE new invoice\n"); Console.Clear(); //grandTotal += NewInvoice.CreateNewInvoice(counter++); bool invoiceCreated = NewInvoice.CreateNewInvoice(); if (invoiceCreated) { int invoiceCounter = NewInvoice.GetNumberOfInvoice(); NewInvoice.AddItemToInvoice(invoiceCounter); } break; case 3: //Console.WriteLine("DISPLAY invoice\n"); Console.Clear(); InvoicesReport.DisplayInvoicesReport(); break; case 4: Console.Clear(); Console.WriteLine("EXITING the application... Thank you!"); break; default: Console.Clear(); Console.WriteLine(">>> Invalid input. Please try again!\n"); break; } } else { Console.Clear(); Console.WriteLine(">>> Invalid input. Please try again!\n"); } } }
public void Initialize(PlayerManager _PlayerManager) { mPlayerManager = _PlayerManager; mDisplayInventory = GameManager.mInstance.mDisplayInventory; foreach (InventorySlot slot in mStartingItemList) { InventorySlot newSlot = new InventorySlot(mPlayerManager.mStats, slot.mItem, slot.mAmount); mItemList.Add(newSlot); } }
public void SellItems() { DInv = InvPanel.GetComponent <DisplayInventory>(); for (int i = 0; i < Inv.Container.Count; i++) { money = money + Inv.Container[i].item.Value; DInv.DestroyUI(); } Inv.Container.Clear(); }
public void RunAdminModule() { Console.Clear(); Console.WriteLine(">>> You have been authenticated. Welcome ADMIN user!\n"); while (option != exitValue) { DisplayAdminMenu(); Console.Write("\nChoose an option: "); input = Console.ReadLine(); bool result = Int32.TryParse(input, out option); if (result) { switch (option) { case 1: Console.Clear(); DisplayInventory.ListInventory(); break; case 2: Console.Clear(); NewItem.GetItemData(); break; case 3: Console.Clear(); ModifyItem.ModifyItemData(); break; case 4: Console.Clear(); RemoveItem.RemoveItemFromInventory(); break; case 5: Console.Clear(); Console.WriteLine("EXITING the application... Thank you!"); break; default: Console.Clear(); Console.WriteLine(">>> Invalid number. Please try again!\n"); break; } } else { Console.Clear(); Console.WriteLine(">>> Invalid input. Please try again!\n"); } } }
void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
// Start is called before the first frame update void Start() { pauseMenu.SetActive(false); isPaused = false; justPressed = false; currentState = MenuState.main; sepiaMat = sceneCam.GetComponent <ApplyPostProcess>().PPMat; sepiaMat.SetFloat("_amount", 0); invDisplay = pauseMenu.GetComponentInChildren <DisplayInventory>(); }
// Use this for initialization void Start() { if (equippedArmor.Length != 6) { equippedArmor = new Armor[6]; } playerInventory = GetComponent <PlayerInventory>(); if (displayInventory == null) { displayInventory = GetComponentInChildren <DisplayInventory>(); } }
public DisplayLcd(Program program, IMyTextPanel lcd) { this.program = program; this.lcd = lcd; this.DisplayInventory = new DisplayInventory(this); this.DisplayDrill = new DisplayDrill(this); this.DisplayMachine = new DisplayMachine(this); this.DisplayPower = new DisplayPower(this); this.DisplayShip = new DisplayShip(this); this.DisplayTank = new DisplayTank(this); }
void Awake() { //singleton pattern if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
void Awake() { if (mInstance == null) { mInstance = this; } else { Debug.LogError("Only one DisplayInventory allowed! Destorying duplicate."); Destroy(this.gameObject); } }
public bool RunMenu() { bool exit = false; OwnerMenu om = new OwnerMenu(); while (CurrentMenu) { int input = om.GetMenuItem(); switch (input) { case 1: // call something //Console.WriteLine("Calling option 1"); DisplayInventory di = new DisplayInventory(); di.ProcessRequests(); break; case 2: //Console.WriteLine("Calling option 2"); DisplayInventoryThreshold dit = new DisplayInventoryThreshold(); dit.ProcessRequests(); break; case 3: //Console.WriteLine("Calling option 3"); AddNewInventoryItem AddNew = new AddNewInventoryItem(); AddNew.ProcessRequests(); break; case 4: CurrentMenu = false; break; case 5: CurrentMenu = false; exit = true; break; } } return(exit); }
// Start is called before the first frame update void Start() { Single = this; }
// Start is called before the first frame update void Start() { _displayScript = _inventoryScreenRef.GetComponent <DisplayInventory>(); }
// Start is called before the first frame update void Start() { MMPB = GameObject.FindWithTag("scriptsContainer").GetComponent <MyMiscritsPageButton>(); inventoryScreen1 = GameObject.FindWithTag("Screen1"); DI = GameObject.FindWithTag("Content").GetComponent <DisplayInventory>(); }
//private GameObject content; // Start is called before the first frame update void Start() { displayInventory = GetComponent <DisplayInventory>(); // content = Resources.Load<GameObject>("Content") ; }
void Start() { inventoryUi = GameObject.FindGameObjectWithTag("Finish").GetComponent <DisplayInventory>(); }