Revolver, Shotgun, Rifle, Assult Rifle, Super Soaker - Add Items script and IItems interface, stores and manages selected item - Add Weapon script controls gun parameters, such as effective range, spread and recoil - Weapon sprites (32x32 Firearm Pack) - Weapon sounds (made with rFXGen) - Move BlockPos and Facing to own filesmain
After Width: | Height: | Size: 313 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/AK47.png-b3a2177e704ef07670dcc3fbcf5fe2b5.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/AK47.png" |
||||
dest_files=[ "res://.import/AK47.png-b3a2177e704ef07670dcc3fbcf5fe2b5.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 241 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/Blunderbuss.png-f9541a9afbcc7503436ddb33d87600bd.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/Blunderbuss.png" |
||||
dest_files=[ "res://.import/Blunderbuss.png-f9541a9afbcc7503436ddb33d87600bd.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 338 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/BowArrow.png-6b5dd8d866365f0485866a478b6a0cd1.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/BowArrow.png" |
||||
dest_files=[ "res://.import/BowArrow.png-6b5dd8d866365f0485866a478b6a0cd1.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 255 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/ColtSingleActionArmy.png-4ffeb11f8b9db175b4a4529b4533c26c.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/ColtSingleActionArmy.png" |
||||
dest_files=[ "res://.import/ColtSingleActionArmy.png-4ffeb11f8b9db175b4a4529b4533c26c.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 168 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/Derringer.png-43093e7c64541e63c047f9a45f88d5c6.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/Derringer.png" |
||||
dest_files=[ "res://.import/Derringer.png-43093e7c64541e63c047f9a45f88d5c6.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 231 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/DoubleBarrel.png-0d2a0a5877ea0832296b59ab69073d32.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/DoubleBarrel.png" |
||||
dest_files=[ "res://.import/DoubleBarrel.png-0d2a0a5877ea0832296b59ab69073d32.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 308 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/FNScar.png-6b3a68f387ec6ab89122d03cf241a16f.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/FNScar.png" |
||||
dest_files=[ "res://.import/FNScar.png-6b3a68f387ec6ab89122d03cf241a16f.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 243 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/LaserPistol.png-5913c4141046557751080b5a6a4dcbb9.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/LaserPistol.png" |
||||
dest_files=[ "res://.import/LaserPistol.png-5913c4141046557751080b5a6a4dcbb9.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 229 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/M1911.png-fb90f2bf6081ebaaa4570e1f13d26084.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/M1911.png" |
||||
dest_files=[ "res://.import/M1911.png-fb90f2bf6081ebaaa4570e1f13d26084.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 5.2 KiB |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/M1Garand.png-8ea72bda0579460c0ab21455199ddf51.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/M1Garand.png" |
||||
dest_files=[ "res://.import/M1Garand.png-8ea72bda0579460c0ab21455199ddf51.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 227 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/MP40.png-541ce9f02220339ddd77f7c18bfb102c.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/MP40.png" |
||||
dest_files=[ "res://.import/MP40.png-541ce9f02220339ddd77f7c18bfb102c.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 218 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/MauserC96.png-e3f26ff256559f76cbf4380e8c78de28.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/MauserC96.png" |
||||
dest_files=[ "res://.import/MauserC96.png-e3f26ff256559f76cbf4380e8c78de28.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 244 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/MoneyLauncher.png-38558cda7f759b8a828a02520ae7fa9d.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/MoneyLauncher.png" |
||||
dest_files=[ "res://.import/MoneyLauncher.png-38558cda7f759b8a828a02520ae7fa9d.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 249 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/P90.png-b84ced4c3b84daba88bcb46f3f2fb629.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/P90.png" |
||||
dest_files=[ "res://.import/P90.png-b84ced4c3b84daba88bcb46f3f2fb629.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 356 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/PlasmaBlaster.png-662106c2dd5c775f0121fd667460ead0.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/PlasmaBlaster.png" |
||||
dest_files=[ "res://.import/PlasmaBlaster.png-662106c2dd5c775f0121fd667460ead0.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 257 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/RocketLauncher.png-fa5fe47507c4a5106da9783313b29ce2.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/RocketLauncher.png" |
||||
dest_files=[ "res://.import/RocketLauncher.png-fa5fe47507c4a5106da9783313b29ce2.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 237 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/Sawed-OffWinchester1897.png-1828856c6c85c4c85f9f239d881cc72a.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/Sawed-OffWinchester1897.png" |
||||
dest_files=[ "res://.import/Sawed-OffWinchester1897.png-1828856c6c85c4c85f9f239d881cc72a.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 305 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/SuperSoaker.png-ad26a5aee73722ca7f641ac2f8616b8a.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/SuperSoaker.png" |
||||
dest_files=[ "res://.import/SuperSoaker.png-ad26a5aee73722ca7f641ac2f8616b8a.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 291 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/ThombsonSMG.png-3e71e65b4033797b49413ad61792d18e.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/ThombsonSMG.png" |
||||
dest_files=[ "res://.import/ThombsonSMG.png-3e71e65b4033797b49413ad61792d18e.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 233 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/Uzi.png-1c37865966347d689e7d0d5728dc5079.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/Uzi.png" |
||||
dest_files=[ "res://.import/Uzi.png-1c37865966347d689e7d0d5728dc5079.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 221 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/WaltherP38.png-c8185be1b2a1769c60b86322c1f29049.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/WaltherP38.png" |
||||
dest_files=[ "res://.import/WaltherP38.png-c8185be1b2a1769c60b86322c1f29049.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 239 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/Winchester1873.png-1b4ec1d71f56d7af98fb910a51fa5323.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/Winchester1873.png" |
||||
dest_files=[ "res://.import/Winchester1873.png-1b4ec1d71f56d7af98fb910a51fa5323.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
After Width: | Height: | Size: 234 B |
@ -0,0 +1,34 @@ |
||||
[remap] |
||||
|
||||
importer="texture" |
||||
type="StreamTexture" |
||||
path="res://.import/Winchester1897.png-a4adb39ab0537aef28a489a5a9e49483.stex" |
||||
metadata={ |
||||
"vram_texture": false |
||||
} |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://gfx/guns/Winchester1897.png" |
||||
dest_files=[ "res://.import/Winchester1897.png-a4adb39ab0537aef28a489a5a9e49483.stex" ] |
||||
|
||||
[params] |
||||
|
||||
compress/mode=0 |
||||
compress/lossy_quality=0.7 |
||||
compress/hdr_mode=0 |
||||
compress/bptc_ldr=0 |
||||
compress/normal_map=0 |
||||
flags/repeat=0 |
||||
flags/filter=true |
||||
flags/mipmaps=false |
||||
flags/anisotropic=false |
||||
flags/srgb=2 |
||||
process/fix_alpha_border=true |
||||
process/premult_alpha=false |
||||
process/HDR_as_SRGB=false |
||||
process/invert_color=false |
||||
stream=false |
||||
size_limit=0 |
||||
detect_3d=false |
||||
svg/scale=1.0 |
@ -0,0 +1,21 @@ |
||||
[remap] |
||||
|
||||
importer="wav" |
||||
type="AudioStreamSample" |
||||
path="res://.import/assault_rifle.wav-be55643f0ef4eee454a1d69851e40bdb.sample" |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://sfx/assault_rifle.wav" |
||||
dest_files=[ "res://.import/assault_rifle.wav-be55643f0ef4eee454a1d69851e40bdb.sample" ] |
||||
|
||||
[params] |
||||
|
||||
force/8_bit=false |
||||
force/mono=false |
||||
force/max_rate=false |
||||
force/max_rate_hz=44100 |
||||
edit/trim=false |
||||
edit/normalize=false |
||||
edit/loop=false |
||||
compress/mode=0 |
@ -0,0 +1,21 @@ |
||||
[remap] |
||||
|
||||
importer="wav" |
||||
type="AudioStreamSample" |
||||
path="res://.import/revolver.wav-a193edf66acf3d5ba572c83152b952b7.sample" |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://sfx/revolver.wav" |
||||
dest_files=[ "res://.import/revolver.wav-a193edf66acf3d5ba572c83152b952b7.sample" ] |
||||
|
||||
[params] |
||||
|
||||
force/8_bit=false |
||||
force/mono=false |
||||
force/max_rate=false |
||||
force/max_rate_hz=44100 |
||||
edit/trim=false |
||||
edit/normalize=false |
||||
edit/loop=false |
||||
compress/mode=0 |
@ -0,0 +1,21 @@ |
||||
[remap] |
||||
|
||||
importer="wav" |
||||
type="AudioStreamSample" |
||||
path="res://.import/rifle.wav-4d8a68001c8b651b3f0f41b64fa095a8.sample" |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://sfx/rifle.wav" |
||||
dest_files=[ "res://.import/rifle.wav-4d8a68001c8b651b3f0f41b64fa095a8.sample" ] |
||||
|
||||
[params] |
||||
|
||||
force/8_bit=false |
||||
force/mono=false |
||||
force/max_rate=false |
||||
force/max_rate_hz=44100 |
||||
edit/trim=false |
||||
edit/normalize=false |
||||
edit/loop=false |
||||
compress/mode=0 |
@ -0,0 +1,21 @@ |
||||
[remap] |
||||
|
||||
importer="wav" |
||||
type="AudioStreamSample" |
||||
path="res://.import/shotgun.wav-29870054b4a67834b920542f9f1e5152.sample" |
||||
|
||||
[deps] |
||||
|
||||
source_file="res://sfx/shotgun.wav" |
||||
dest_files=[ "res://.import/shotgun.wav-29870054b4a67834b920542f9f1e5152.sample" ] |
||||
|
||||
[params] |
||||
|
||||
force/8_bit=false |
||||
force/mono=false |
||||
force/max_rate=false |
||||
force/max_rate_hz=44100 |
||||
edit/trim=false |
||||
edit/normalize=false |
||||
edit/loop=false |
||||
compress/mode=0 |
@ -0,0 +1,61 @@ |
||||
using System; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using Godot; |
||||
|
||||
// TODO: Add ways to add/move/remove items, including event when changed. |
||||
public interface IItems : IReadOnlyCollection<Node2D> |
||||
{ |
||||
Node2D this[int index] { get; } |
||||
Node2D Current { get; set; } |
||||
} |
||||
|
||||
public class Items : Node2D, IItems |
||||
{ |
||||
[Export] public NodePath DefaultItemPath { get; set; } |
||||
|
||||
private Node2D _current; |
||||
public int Count => GetChildCount(); |
||||
public Node2D this[int index] => GetChild<Node2D>(index); |
||||
public Node2D Current { get => _current; set => SetCurrent(value, true); } |
||||
|
||||
public override void _Ready() |
||||
{ |
||||
foreach (var item in this) SetActive(item, false); |
||||
if (DefaultItemPath != null) SetCurrent(GetNode<Node2D>(DefaultItemPath), false); |
||||
} |
||||
|
||||
private void SetCurrent(Node2D node, bool sendRpc) |
||||
{ |
||||
if (node == _current) return; |
||||
if ((node != null) && (node.GetParent() != this)) throw new ArgumentException(); |
||||
|
||||
SetActive(_current, false); |
||||
SetActive(node, true); |
||||
_current = node; |
||||
|
||||
if (sendRpc) { |
||||
if (this.GetGame() is Server) Rpc(nameof(DoSetCurrent), _current?.Name); |
||||
else RpcId(1, nameof(DoSetCurrent), _current?.Name); |
||||
} |
||||
} |
||||
[Remote] |
||||
private void DoSetCurrent(string name) |
||||
{ |
||||
var node = (name != null) ? GetNode<Node2D>(name) : null; |
||||
SetCurrent(node, this.GetGame() is Server); |
||||
} |
||||
|
||||
public IEnumerator<Node2D> GetEnumerator() |
||||
=> GetChildren().Cast<Node2D>().GetEnumerator(); |
||||
IEnumerator IEnumerable.GetEnumerator() |
||||
=> GetEnumerator(); |
||||
|
||||
private static void SetActive(Node2D node, bool value) { |
||||
if (node == null) return; |
||||
node.SetProcessInput(value); |
||||
node.SetProcessUnhandledInput(value); |
||||
node.Visible = value; |
||||
} |
||||
} |
@ -0,0 +1,122 @@ |
||||
using Godot; |
||||
|
||||
public class Weapon : Sprite |
||||
{ |
||||
[Export] public int EffectiveRange { get; set; } = 320; |
||||
[Export] public int MaximumRange { get; set; } = 640; |
||||
|
||||
[Export] public float Spread { get; set; } = 0.0F; |
||||
[Export] public float SpreadIncrease { get; set; } = 0.0F; |
||||
[Export] public float SpreadRegen { get; set; } = 10.0F; |
||||
|
||||
[Export] public float RecoilMin { get; set; } = 0.0F; |
||||
[Export] public float RecoilMax { get; set; } = 0.0F; |
||||
[Export] public float RecoilRegen { get; set; } = 10.0F; |
||||
|
||||
// TODO: Make the Regen multiplicative instead of substractive? |
||||
|
||||
|
||||
public Cursor Cursor { get; private set; } |
||||
public Player Player { get; private set; } |
||||
|
||||
private float _currentSpreadInc = 0.0F; |
||||
private float _currentRecoil = 0.0F; |
||||
|
||||
public float AimDirection { get; private set; } |
||||
|
||||
|
||||
public override void _Ready() |
||||
{ |
||||
Cursor = this.GetClient()?.Cursor; |
||||
Player = GetParent().GetParent<Player>(); |
||||
} |
||||
|
||||
public override void _UnhandledInput(InputEvent ev) |
||||
{ |
||||
if (!(Player is LocalPlayer)) return; |
||||
|
||||
// TODO: Is not "place", is shoot! |
||||
if (ev.IsActionPressed("interact_place")) { |
||||
GetNodeOrNull<AudioStreamPlayer2D>("Fire")?.Play(); |
||||
// TODO: Spawn bullet or something. |
||||
// TODO: Tell server (and other clients) we shot. |
||||
_currentSpreadInc += Mathf.Deg2Rad(SpreadIncrease); |
||||
_currentRecoil += Mathf.Deg2Rad((float)GD.RandRange(RecoilMin, RecoilMax)); |
||||
} |
||||
} |
||||
|
||||
public override void _Process(float delta) |
||||
{ |
||||
// FIXME: Need to run _Process after switching to a weapon. |
||||
|
||||
_currentSpreadInc = Mathf.Max(0, _currentSpreadInc - Mathf.Deg2Rad(SpreadRegen) * delta); |
||||
_currentRecoil = Mathf.Max(0, _currentRecoil - Mathf.Deg2Rad(RecoilRegen) * delta); |
||||
|
||||
if (Visible && (Player is LocalPlayer)) { |
||||
AimDirection = Cursor.Position.AngleToPoint(Player.Position); |
||||
RpcId(1, nameof(SendAimAngle), AimDirection); |
||||
Update(); |
||||
} |
||||
|
||||
var angle = Mathf.PosMod(AimDirection + Mathf.Pi, Mathf.Tau) - Mathf.Pi; |
||||
angle = Mathf.Abs(Mathf.Rad2Deg(angle)); |
||||
if (Scale.y > 0) { if (angle > 100.0F) Scale = new Vector2(1, -1); } |
||||
else if (angle < 80.0F) Scale = new Vector2(1, 1); |
||||
Rotation = AimDirection - _currentRecoil * ((Scale.y > 0) ? 1 : -1); |
||||
} |
||||
|
||||
[Remote] |
||||
private void SendAimAngle(float value) |
||||
{ |
||||
if (this.GetGame() is Server) { |
||||
if (Player.NetworkID != GetTree().GetRpcSenderId()) return; |
||||
// TODO: Verify input. |
||||
// if ((value < 0) || (value > Mathf.Tau)) return; |
||||
Rpc(nameof(SendAimAngle), value); |
||||
} else if (!(Player is LocalPlayer)) |
||||
AimDirection = value; |
||||
} |
||||
|
||||
public override void _Draw() |
||||
{ |
||||
if (!(Player is LocalPlayer)) return; |
||||
|
||||
var tip = GetNode<Node2D>("Tip").Position + new Vector2(4, 0); |
||||
var angle = Mathf.Sin((Mathf.Deg2Rad(Spread) + _currentSpreadInc) / 2); |
||||
var color = Colors.Black; |
||||
|
||||
var points = new Vector2[8]; |
||||
var colors = new Color[8]; |
||||
colors[0] = colors[7] = new Color(color, 0.0F); |
||||
points[0] = points[7] = tip; |
||||
colors[1] = colors[6] = new Color(color, 0.15F); |
||||
points[1] = tip + new Vector2(1, angle) * 64; |
||||
points[6] = tip + new Vector2(1, -angle) * 64; |
||||
colors[2] = colors[5] = new Color(color, 0.15F); |
||||
points[2] = tip + new Vector2(1, angle) * EffectiveRange; |
||||
points[5] = tip + new Vector2(1, -angle) * EffectiveRange; |
||||
colors[3] = colors[4] = new Color(color, 0.0F); |
||||
points[3] = tip + new Vector2(1, angle) * MaximumRange; |
||||
points[4] = tip + new Vector2(1, -angle) * MaximumRange; |
||||
|
||||
var st = new SurfaceTool(); |
||||
st.Begin(Mesh.PrimitiveType.TriangleStrip); |
||||
st.AddColor(colors[0]); |
||||
st.AddVertex(To3(points[0])); |
||||
st.AddColor(colors[1]); |
||||
st.AddVertex(To3(points[1])); |
||||
st.AddVertex(To3(points[6])); |
||||
st.AddColor(colors[2]); |
||||
st.AddVertex(To3(points[2])); |
||||
st.AddVertex(To3(points[5])); |
||||
st.AddColor(colors[3]); |
||||
st.AddVertex(To3(points[3])); |
||||
st.AddVertex(To3(points[4])); |
||||
st.Index(); |
||||
|
||||
DrawMesh(st.Commit(), null); |
||||
DrawPolylineColors(points, colors, antialiased: true); |
||||
} |
||||
private static Vector3 To3(Vector2 vec) |
||||
=> new Vector3(vec.x, vec.y, 0); |
||||
} |
@ -0,0 +1,52 @@ |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using Godot; |
||||
|
||||
public enum Facing |
||||
{ |
||||
Left, |
||||
Right, |
||||
Up, |
||||
Down, |
||||
} |
||||
|
||||
public static class Facings |
||||
{ |
||||
public static readonly IReadOnlyCollection<Facing> All = new []{ Facing.Left, Facing.Right, Facing.Up, Facing.Down }; |
||||
public static readonly IReadOnlyCollection<Facing> Horizontal = new []{ Facing.Left, Facing.Right }; |
||||
public static readonly IReadOnlyCollection<Facing> Vertical = new []{ Facing.Up, Facing.Down }; |
||||
|
||||
public static BlockPos ToBlockPos(this Facing facing) |
||||
{ |
||||
switch (facing) { |
||||
case Facing.Left: return BlockPos.Left; |
||||
case Facing.Right: return BlockPos.Right; |
||||
case Facing.Up: return BlockPos.Up; |
||||
case Facing.Down: return BlockPos.Down; |
||||
default: throw new ArgumentException(); |
||||
} |
||||
} |
||||
public static Vector2 ToVector(this Facing facing) |
||||
=> facing.ToBlockPos().ToVector(); |
||||
|
||||
public static Facing FromAngle(float radians) |
||||
{ |
||||
radians = Mathf.PosMod(radians, Mathf.Tau); |
||||
if (radians < Mathf.Pi / 4) return Facing.Right; |
||||
else if (radians < Mathf.Pi / 4 * 3) return Facing.Down; |
||||
else if (radians < Mathf.Pi / 4 * 5) return Facing.Left; |
||||
else if (radians < Mathf.Pi / 4 * 7) return Facing.Up; |
||||
else return Facing.Right; |
||||
} |
||||
|
||||
public static float ToAngle(this Facing facing) |
||||
{ |
||||
switch (facing) { |
||||
case Facing.Right: return 0; |
||||
case Facing.Down: return Mathf.Pi / 2; |
||||
case Facing.Left: return Mathf.Pi; |
||||
case Facing.Up: return Mathf.Pi / 2 * 3; |
||||
default: throw new ArgumentException(); |
||||
} |
||||
} |
||||
} |