Esempio n. 1
0
    void Start()
    {
        goal = transform.position;

        string[] s = gameObject.name.Split('(');
        itemName = s [0];

        LootManager lootManager = GameObject.FindGameObjectWithTag("Lootable").GetComponent <LootManager> ();

        int[] values = lootManager.GetItemValues(itemName);

        scoreBonus  = values [0];
        healthBonus = values [1];
    }