Example #1
0
    /* one slot items moves correctly
     * 2 and more slot items moves incorectly
     *
     *
     */

    void Awake()
    {
        text   = FindObjectOfType <Text>();
        iRef   = FindObjectOfType <InventoryReference>();
        player = iRef.playerInventory;
        border = Resources.Load("prefabs/border") as GameObject;
    }
Example #2
0
 void Awake()
 {
     if (instance != null)
     {
         Debug.Log("Mulit instances are there for theinventory");
     }
     instance = this;
 }
Example #3
0
 // Use this for initialization
 void Start()
 {
     rb        = GetComponent <Rigidbody>();
     playerInv = GetComponent <InventoryV2>();
 }
Example #4
0
 void Start()
 {
     //transform.parent = null;
     playerInv = transform.root.transform.Find("FPS").GetComponent<InventoryV2>();
     Jitika = transform.root.GetComponent<GameInv>().gInv[id];
 }
Example #5
0
    // Use this for initialization
    void Start()
    {
        UserPl = transform.parent.GetComponent<UserPlayer>();
        playerInv = GetComponent<InventoryV2>();
        escScript = GetComponent<GameMenu>();

        sx = Screen.width;
        sy = Screen.height;

        cwLocX = mainX + 2;
        cwLocY = mainY + 40;
        cwWidth = 200;
        cwHeight = mainH - 40 - 50;

        picX = mainX + cwWidth + 10;
        picY = cwLocY;
        btnW = cwWidth - 16;

        recX = picX + picW + 5;
        recY = picY;
        recW = mainX + mainW - recX - 2;
        recH = cwHeight;
        rbtnW = recW - 16;

        crBtnX = mainX + 10;
        crBtnY = cwLocY + cwHeight + 10;
        crBtnW = mainW - 20;
        crBtnH = mainH - cwHeight - 40 - 20;

        canCraft = new bool[craftList.Length];
    }
Example #6
0
    // Use this for initialization
    void Start()
    {
        TerraMgr = GameObject.Find(" TerrainMgr");
        sx = Screen.width;
        sy = Screen.height;
        posx = (sx/2) - (xhairDim/2);
        posy = (sy/2) - (xhairDim/2);

        inv = gameObject.GetComponent<InventoryV2>();
    }
Example #7
0
 // Use this for initialization
 void Awake()
 {
     Instance = this;
 }
 void Start()
 {
     inventoryObject = GameObject.FindGameObjectWithTag("Inventory").GetComponent <InventoryV2>();
     //inventoryObject.OnItemChangeCallback += DisplayUI;
 }