Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / item / weapon / knife / Knife.cs
@小李xl 小李xl on 12 Nov 2022 855 bytes 基础近战武器 (还没做完)

using Godot;

[RegisterWeapon("1004", typeof(KnifeAttribute))]
public class Knife : Weapon
{

    private class KnifeAttribute : WeaponAttribute
    {
        public KnifeAttribute()
        {
            Sprite = ResourcePath.resource_sprite_gun_knife1_png;
            WeaponPrefab = ResourcePath.prefab_weapon_Knife_tscn;
            //握把位置
            HoldPosition = new Vector2(10, 0);
            //关闭后坐力
            MaxBacklash = 0;
            MinBacklash = 0;
            UpliftAngleRestore = 3;
            UpliftAngle = -80;
            DefaultAngle = 0;
        }
    }
    
    public Knife(string id, WeaponAttribute attribute) : base(id, attribute)
    {
        
        
    }

    protected override void OnFire()
    {
        
    }

    protected override void OnShoot(float fireRotation)
    {
        
    }
}