public void GiveWeaponToPlayer()
    {
        PlayerCombat pc = target.GetComponent <PlayerCombat>();

        if (pc != null)
        {
            pc.EquipWeapon(item);
        }
    }
Beispiel #2
0
    public void GiveWeaponToPlayer(GameObject player)
    {
        PlayerCombat pc = player.GetComponent <PlayerCombat>();

        if (pc)
        {
            pc.EquipWeapon(weapon);
        }
    }
        void DoTheMethod()
        {
            var go = Fsm.GetOwnerDefaultTarget(gameObject);

            if (go == null)
            {
                return;
            }
            item                      = new Item();
            item.itemName             = itemName.Value;
            item.sfx                  = sfx.Value;
            item.callMethod           = callMethod.Value;
            item.data                 = data.Value;
            item.isPickup             = isPickup.Value;
            item.SpawnObjectOnDestroy = SpawnObjectOnDestroy.Value;

            var weapon = item;

            theScript.EquipWeapon(weapon);
        }