Exemple #1
0
    void FireWeapon()
    {
        WeaponBehavior weapon = transform.Find("Equipment").Find("WeaponSlot").GetChild(activeWeapon).GetChild(0).GetComponent <WeaponBehavior>();

        stats.energy            -= weapon.EnergyDrainAmount;
        stats.lastEnergyUsedTime = Time.time;
        weapon.FireWeapon(transform, playerVelocity);
    }