Beispiel #1
0
    private void Start()
    {
        if (FindObjectOfType <PlayerVars>().isActiveAndEnabled)
        {
            print("Found the Player's Bag");

            if (PlayerVars.Instance.slot1.weapontype == weaponType.none)
            {
                //Debug.Log("Setting weapons");
                PlayerVars.Instance.slot1 = gunObj.FindWeapon(1);
                // PlayerVars.Instance.slot2 = gunObj.FindWeapon(9);
                //temp for testing
                //PlayerVars.Instance.slot2 = gunObj.FindWeapon(17);
                print("pistol set");
            }
            SetGun1(PlayerVars.Instance.slot1);
            SetGun2(PlayerVars.Instance.slot2);
        }
        currnetWeapon = slot1;
        _playerWeapon = FindObjectOfType <PlayerWeapom>();
        //_playerWeapon.damage = 200;
        _playerWeapon.checkWeapon();
    }