// Use this for initialization void Start() { SelectedItem = 0; items = FindObjectOfType <simpleInventory>(); inventory = FindObjectOfType <simpleInventory>(); player = FindObjectOfType <simplePlayer>(); }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Q) && CanvasOpen == false) { move = FindObjectOfType <SimpleMove>(); // if player cannot move like if he is in event or battle stat // no movment should talk place if (move.canMove == true) { SelectedItem = 0; move.canMove = false; Debug.Log("Opend Stats"); CanvasOpen = true; StatsCanvasPannel.gameObject.SetActive(true); player = FindObjectOfType <simplePlayer>(); AddInventoryItemsToList(); } } else if (Input.GetKeyDown(KeyCode.Q) && CanvasOpen == true && move.canMove == false) { move.canMove = true; CanvasOpen = false; StatsCanvasPannel.gameObject.SetActive(false); // AddInventoryItemsToList(); } if (CanvasOpen == true) { SelectSlots(); } }
// Use this for initialization void Start() { player = FindObjectOfType <simplePlayer>(); movement = FindObjectOfType <SimpleMove>(); inventory = FindObjectOfType <simpleInventory>(); attack = FindObjectOfType <Attacks>(); BattlePannel.gameObject.SetActive(false); }
// Use this for initialization void Start() { player = FindObjectOfType <simplePlayer>(); PopUpPannel.gameObject.SetActive(false); SaveDataPannel.gameObject.SetActive(false); insave = false; JustStarted = true; Invoke("saveEnableCountDown", 2f); }
// Use this for initialization void Start() { player = FindObjectOfType <simplePlayer>(); SelectedItem = 0; ConstructInventory(); // test adding items you can remove when done addItem(1); addItem(5); addItem(3); addItem(6); addItem(7); }