// The weapon is always in the players hand, it just need to be activated by 'picking up' the weapon on the ground.
    void Start()
    {
        isOff = true;
        isOn  = false;

        inRange = GameObject.Find("Off").GetComponent <Item_Range> ();
    }
Exemplo n.º 2
0
    // The weapon is always in the players hand, it just need to be activated by 'picking up' the weapon on the ground.
    void Start()
    {
        showWeapon        = false;
        showWeaponCollect = true;

        inRange = GameObject.Find("Weapon Collectable").GetComponent <Item_Range> ();
    }
    void Start()
    {
        if (tag != "Item")
        {
            Debug.LogError("You need to add the Item tag to this object. You've added a pickup item script");
        }

        if ((item = GetComponent <Item>()) == null)
        {
            Debug.Log("You need to add an Item script");
        }

        if ((rangeCheck = GetComponent <Item_Range>()) == null)
        {
            Debug.Log("You need to add a Item Range script");
        }

        if (GetComponent <Item_Pickup>() == null)
        {
            Debug.LogError("You need to add an item pickup script");
        }

        p_inv = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Inventory>();
    }