Esempio n. 1
0
    void Start()
    {
        toolDisplay = FindObjectOfType<ToolDisplayManager> ();
        inventoryUiManager = FindObjectOfType<InventoryUIManager> ();
        thoughtBubbleManager = FindObjectOfType<ThoughtBubbleManager> ();

        sprites = Resources.LoadAll<Sprite> ("Player/" + player.SpriteName);
        spriteRenderer = GetComponent<SpriteRenderer> ();
        spriteRenderer.sprite = sprites [4];

        if (player.CurrentTool != null) {
            UpdateCurrentTool ();
        }

        if (InventoryInitialised) {
            inventoryUiManager.LinkInventoryToUI (player.Inventory);
            player.Inventory.Notify ();
        }
    }