Browse Source
This commit is equal to version 0.0.2. Version 0.0.1 source code is available on archive.orgmaster
commit
f3bf534682
275 changed files with 24085 additions and 0 deletions
@ -0,0 +1,2 @@ |
|||
# Normalize EOL for all files that Git considers text files. |
|||
* text=auto eol=lf |
@ -0,0 +1,30 @@ |
|||
--- |
|||
name: Bug Report |
|||
about: Report a bug with the TPS demo. |
|||
title: '' |
|||
labels: bug |
|||
assignees: '' |
|||
|
|||
--- |
|||
|
|||
<!-- |
|||
Please search existing issues for potential duplicates before filing yours: |
|||
https://github.com/godotengine/tps-demo/issues?q=is%3Aissue |
|||
|
|||
Only submit an issue if it is reproducible with the latest stable Godot version. |
|||
--> |
|||
|
|||
**OS/device including version:** |
|||
<!-- Specify GPU model and drivers if graphics-related. --> |
|||
|
|||
|
|||
**Issue description:** |
|||
<!-- What happened, what was expected, and what went wrong. --> |
|||
|
|||
|
|||
**Screenshots of issue:** |
|||
<!-- |
|||
This section is optional. |
|||
Drag in an image, or post an image with a link in the form of: |
|||
 |
|||
--> |
@ -0,0 +1,13 @@ |
|||
--- |
|||
name: Enhancement Request |
|||
about: Request improvements to the TPS demo. |
|||
title: '' |
|||
labels: enhancement |
|||
assignees: '' |
|||
|
|||
--- |
|||
|
|||
<!-- |
|||
Please search existing issues for potential duplicates before filing yours: |
|||
https://github.com/godotengine/tps-demo/issues?q=is%3Aissue |
|||
--> |
@ -0,0 +1,6 @@ |
|||
version: 2 |
|||
updates: |
|||
- package-ecosystem: "github-actions" |
|||
directory: "/" |
|||
schedule: |
|||
interval: "daily" |
@ -0,0 +1,19 @@ |
|||
name: Static Checks |
|||
on: [push, pull_request] |
|||
|
|||
jobs: |
|||
format: |
|||
name: File formatting (file_format.sh) |
|||
runs-on: ubuntu-20.04 |
|||
steps: |
|||
- name: Checkout |
|||
uses: actions/checkout@v2 |
|||
|
|||
- name: Install dependencies |
|||
run: | |
|||
sudo apt-get update -qq |
|||
sudo apt-get install -qq dos2unix recode |
|||
|
|||
- name: File formatting checks (file_format.sh) |
|||
run: | |
|||
bash ./file_format.sh |
@ -0,0 +1,22 @@ |
|||
# Godot 4+ specific ignores |
|||
.godot/ |
|||
|
|||
# Godot-specific ignores |
|||
.import/ |
|||
export.cfg |
|||
export_presets.cfg |
|||
|
|||
# Imported translations (automatically generated from CSV files) |
|||
*.translation |
|||
|
|||
# Mono-specific ignores |
|||
.mono/ |
|||
data_*/ |
|||
mono_crash.*.json |
|||
|
|||
# System/tool-specific ignores |
|||
.directory |
|||
*~ |
|||
|
|||
# Blender versioning |
|||
*.blend[0-9]* |
@ -0,0 +1,21 @@ |
|||
MIT License |
|||
|
|||
Copyright (c) 2016-2022 The Godot Engine community |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
of this software and associated documentation files (the "Software"), to deal |
|||
in the Software without restriction, including without limitation the rights |
|||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
copies of the Software, and to permit persons to whom the Software is |
|||
furnished to do so, subject to the following conditions: |
|||
|
|||
The above copyright notice and this permission notice shall be included in all |
|||
copies or substantial portions of the Software. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
SOFTWARE. |
File diff suppressed because it is too large
@ -0,0 +1,18 @@ |
|||
[general] |
|||
|
|||
singleton=true |
|||
load_once=true |
|||
symbol_prefix="godot_" |
|||
reloadable=false |
|||
|
|||
[entry] |
|||
|
|||
OSX.64="res://addons/godot-git-plugin/osx/release/libgitapi.dylib" |
|||
Windows.64="res://addons/godot-git-plugin/win64/release/libgitapi.dll" |
|||
X11.64="res://addons/godot-git-plugin/x11/release/libgitapi.so" |
|||
|
|||
[dependencies] |
|||
|
|||
OSX.64=[ ] |
|||
Windows.64=[ ] |
|||
X11.64=[ ] |
@ -0,0 +1,9 @@ |
|||
[gd_resource type="NativeScript" load_steps=2 format=2] |
|||
|
|||
[ext_resource path="res://addons/godot-git-plugin/git_api.gdnlib" type="GDNativeLibrary" id=1] |
|||
|
|||
[resource] |
|||
resource_name = "GitAPI" |
|||
class_name = "GitAPI" |
|||
library = ExtResource( 1 ) |
|||
script_class_name = "GitAPI" |
Binary file not shown.
@ -0,0 +1,7 @@ |
|||
[plugin] |
|||
|
|||
name="Godot Git Plugin" |
|||
description="This plugin lets you interact with Git without leaving the Godot editor. More information can be found at https://github.com/godotengine/godot-git-plugin/wiki" |
|||
author="ChronicallySerious" |
|||
version="v1.2.3" |
|||
script="git_api.gdns" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,32 @@ |
|||
[gd_resource type="AudioBusLayout" load_steps=3 format=2] |
|||
|
|||
[sub_resource type="AudioEffectReverb" id=1] |
|||
resource_name = "Reverb" |
|||
room_size = 0.98 |
|||
hipass = 0.42 |
|||
wet = 0.29 |
|||
|
|||
[sub_resource type="AudioEffectReverb" id=2] |
|||
resource_name = "Reverb" |
|||
room_size = 0.74 |
|||
hipass = 0.14 |
|||
wet = 0.56 |
|||
|
|||
[resource] |
|||
bus/0/volume_db = -10.0 |
|||
bus/1/name = "Outside" |
|||
bus/1/solo = false |
|||
bus/1/mute = false |
|||
bus/1/bypass_fx = false |
|||
bus/1/volume_db = 0.0 |
|||
bus/1/send = "Master" |
|||
bus/1/effect/0/effect = SubResource( 1 ) |
|||
bus/1/effect/0/enabled = true |
|||
bus/2/name = "Reactor" |
|||
bus/2/solo = false |
|||
bus/2/mute = false |
|||
bus/2/bypass_fx = false |
|||
bus/2/volume_db = 0.0 |
|||
bus/2/send = "Master" |
|||
bus/2/effect/0/effect = SubResource( 2 ) |
|||
bus/2/effect/0/enabled = true |
@ -0,0 +1,7 @@ |
|||
[gd_resource type="Environment" load_steps=2 format=2] |
|||
|
|||
[sub_resource type="ProceduralSky" id=1] |
|||
|
|||
[resource] |
|||
background_mode = 2 |
|||
background_sky = SubResource( 1 ) |
@ -0,0 +1,227 @@ |
|||
// AnimuEyes - procedurally generated anime eyes shader |
|||
// add an extra shader pass to your character model and set uvArea to the uv range where you want |
|||
// the eyes to appear. xy are the middle point of the rectangle, zw are width/height. |
|||
// _if you have other transparent materials, make sure to adjust the render priority_ |
|||
// adjust the depthOffset if you don't want them to render through hair or if rendering through |
|||
// hair is wonky |
|||
// godot version tested: 3.2.2 stable |
|||
// license: public domain (UNLICENSE) |
|||
|
|||
shader_type spatial; |
|||
render_mode unshaded; |
|||
|
|||
// these are the uniforms that should be dynamically changed for facial expressions and such |
|||
uniform vec3 lookAt = vec3(0, 0, 100000); // target point relative to eyes |
|||
uniform vec4 maxLook = vec4(-.4, -.2, .4, .2); // eye movement range |
|||
uniform vec2 lookSens = vec2(.2, .2); // adjust until eyes match up with the look target |
|||
uniform float irisScale : hint_range(.1, 1.5) = 1; |
|||
uniform float eyebrowOffset = 0; |
|||
uniform float eyebrowRotationOffsetDegrees : hint_range(-180, 180) = 0; |
|||
uniform float open : hint_range(0, 1) = 1; // might cause some artifacts, mainly used for blinking |
|||
|
|||
// everything else is only recommended to be used to define the base eye aesthetic |
|||
uniform vec4 uvArea = vec4(.5, .5, 1, 1); |
|||
uniform float position = .2; |
|||
uniform float dist = .2; |
|||
uniform float depthOffset = .01; |
|||
|
|||
uniform vec4 color : hint_color = vec4(1, .3, 0, 1); |
|||
uniform vec4 whiteColor : hint_color = vec4(1, 1, 1, 1); |
|||
uniform vec4 rimColor : hint_color = vec4(1, 1, 1, 1); |
|||
uniform vec4 eyebrowColor : hint_color = vec4(0, 0, 0, 1); |
|||
uniform vec4 border1Color : hint_color = vec4(0, 0, 0, 1); |
|||
uniform vec4 border2Color : hint_color = vec4(0, 0, 0, 1); |
|||
|
|||
uniform float shapeSquare : hint_range(0, 1) = .554; |
|||
uniform float irisSquare : hint_range(0, 1) = .219; |
|||
uniform float border1Square : hint_range(0, 1) = .5; |
|||
uniform float border2Square : hint_range(0, 1) = 1; |
|||
uniform float eyebrowSquare : hint_range(0, 1) = .5; |
|||
|
|||
uniform vec4 topEllipse = vec4(.444, .598, .5, .4); |
|||
uniform vec4 bottomEllipse = vec4(.49, .297, .3, .33); |
|||
uniform vec4 irisEllipse = vec4(.53, .35, .17, .236); |
|||
uniform vec4 pupilEllipse = vec4(0, .02, .08, .1); |
|||
|
|||
uniform float eyebrowPosition = 0; |
|||
uniform vec4 eyebrow = vec4(.037, -.369, 1.1, 1.1); |
|||
uniform vec4 eyebrowFalloffEllipse = vec4(.5, -.315, .028, .039); |
|||
uniform float eyebrowFalloff : hint_range(0, 1) = .5; |
|||
uniform float eyebrowRotationDegrees : hint_range(-180, 180) = -10; |
|||
uniform float eyebrowThickness : hint_range(0, .1) = .025; |
|||
|
|||
uniform vec4 border1 = vec4(.025, .016, 1.1, 1.1); |
|||
uniform vec4 border1FalloffEllipse = vec4(.222, -.03, .3, .2); |
|||
uniform float border1Falloff : hint_range(0, 1) = .3; |
|||
uniform float border1RotationDegrees : hint_range(-180, 180) = -3; |
|||
uniform float border1Thickness : hint_range(0, .1) = .025; |
|||
|
|||
uniform vec4 border2 = vec4(-.043, .057, .916, 1); |
|||
uniform vec4 border2FalloffEllipse = vec4(.5, .861, .03, .049); |
|||
uniform float border2Falloff : hint_range(0, 1) = .2; |
|||
uniform float border2RotationDegrees : hint_range(-180, 180) = 0; |
|||
uniform float border2Thickness : hint_range(0, .1) = .008; |
|||
|
|||
uniform float sharpness : hint_range(100, 1000) = 200; |
|||
uniform vec2 scale = vec2(.3, .3); |
|||
uniform float attenuation : hint_range(0, 1) = .3; |
|||
uniform float irisAttenuation : hint_range(0, 1) = .1; |
|||
uniform vec4 highlightEllipse = vec4(.608, .6, .4, .3); |
|||
uniform vec2 irisGradientOffset = vec2(0, -.01); |
|||
uniform vec4 rim1Ellipse = vec4(0.128, -0.034, .067, .043); |
|||
uniform float rim1RotationDegrees : hint_range(-180, 180) = 10; |
|||
uniform vec4 rim2Ellipse = vec4(-0.135, 0.057, .05, .03); |
|||
uniform float rim2RotationDegrees : hint_range(-180, 180) = 10; |
|||
|
|||
float ellipse(vec2 c, vec2 r, vec2 uv) { |
|||
// this is essentialy doing a circle sdf and then distorting the space by the aspect ratio |
|||
float smallDim = min(r.x, r.y); |
|||
return length((c - uv) / r) * smallDim - smallDim; |
|||
} |
|||
|
|||
float ellipse4(vec4 cr, vec2 uv) { |
|||
return ellipse(cr.xy, cr.zw, uv); |
|||
} |
|||
|
|||
float rect(vec2 c, vec2 r, vec2 uv) { |
|||
return length(max(abs(uv - c) - r, 0)); |
|||
} |
|||
|
|||
float rect4(vec4 cr, vec2 uv) { |
|||
return rect(cr.xy, cr.zw, uv); |
|||
} |
|||
|
|||
// this gives a smooth transition when doing min distance to combine shapes |
|||
float smin(float a, float b, float k) { |
|||
float h = clamp(0.5 + 0.5 * (b - a) / k, 0., 1.); |
|||
return mix(b, a, h) - k * h * (1.0 - h); |
|||
} |
|||
|
|||
float squaredEllipse(vec4 cr, vec2 uv, float squareAmt) { |
|||
float e = ellipse4(cr, uv); |
|||
float r = rect4(vec4(cr.xy, cr.zw * squareAmt), uv); |
|||
return smin(e, r, .3); |
|||
} |
|||
|
|||
float hardEdge(float d) { |
|||
return 1.0 - smoothstep(0, 1.0 / sharpness, d); |
|||
} |
|||
|
|||
mat2 rotateMat(float deg) { |
|||
float rad = radians(deg); |
|||
float s = sin(rad), c = cos(rad); |
|||
return mat2(vec2(c, -s), vec2(s, c)); |
|||
} |
|||
|
|||
vec2 rotate(vec2 uv, float deg, vec2 origin) { |
|||
return (uv - origin) * rotateMat(deg) + origin; |
|||
} |
|||
|
|||
vec4 openDelta(float openAmt) { |
|||
return -(bottomEllipse - topEllipse) * vec4(0, 1. - openAmt, 0, 0); |
|||
} |
|||
|
|||
float shape(vec2 uv, float square, float openAmt) { |
|||
float dTop = squaredEllipse(topEllipse + openDelta(openAmt), uv, square); |
|||
float dBot = squaredEllipse(bottomEllipse, uv, square); |
|||
return max(dTop, dBot); |
|||
} |
|||
|
|||
float border(vec2 uv, float ds, vec4 posScale, float rotDeg, vec4 fallEl, float thick, |
|||
float square, float fall, float openAmt) |
|||
{ |
|||
// arbitrary small scaling delta to make stuff look better from far away |
|||
float epsilon = ds * .00011; |
|||
vec2 borderUv = rotate((uv + posScale.xy) / posScale.zw, rotDeg, vec2(.5, .5)); |
|||
float dShape = shape(borderUv, square, openAmt); // shape sdf offset by border offset |
|||
float d = bottomEllipse.y - topEllipse.y; |
|||
float dFalloff = ellipse4(fallEl + openDelta(openAmt), borderUv); |
|||
float falloffAmt = 1.0 - smoothstep(0, fall, dFalloff); |
|||
float thicc = thick * falloffAmt; |
|||
float dBorder = abs(dShape - thick * falloffAmt) - thicc; // always touching edge of shape |
|||
float borderAmt = 1.0 - hardEdge(falloffAmt); |
|||
return hardEdge(dBorder / ds + epsilon) * borderAmt; |
|||
} |
|||
|
|||
float brow(vec2 uv, float dScale) { |
|||
float r = eyebrowRotationDegrees + eyebrowRotationOffsetDegrees; |
|||
return border(uv, dScale, eyebrow, r, eyebrowFalloffEllipse, |
|||
eyebrowThickness, eyebrowSquare, eyebrowFalloff, 1); |
|||
} |
|||
|
|||
vec4 eye(float flipRims, vec2 uv, vec2 look, float dScale) { |
|||
float epsilon = dScale * .00011; |
|||
float shapeEdge = hardEdge(shape(uv, shapeSquare, open) / dScale); |
|||
float border1Edge = border(uv, dScale, border1, border1RotationDegrees, border1FalloffEllipse, |
|||
border1Thickness, border1Square, border1Falloff, open); |
|||
float border2Edge = border(uv, dScale, border2, border2RotationDegrees, border2FalloffEllipse, |
|||
border2Thickness, border2Square, border2Falloff, open); |
|||
vec4 irisE = irisEllipse; |
|||
irisE.xy += look; |
|||
irisE.zw *= irisScale; |
|||
float dIris = squaredEllipse(irisE, uv, irisSquare) / dScale; |
|||
float dIrisGradient = squaredEllipse(irisE, uv + irisGradientOffset, irisSquare); |
|||
float irisEdge = hardEdge(dIris + epsilon * .5); |
|||
float irisGradient = (1.0 - smoothstep(-.001, -.03, dIrisGradient)) * irisEdge; |
|||
vec4 pupilE = pupilEllipse; |
|||
pupilE.xy += irisE.xy; |
|||
pupilE.zw *= irisScale; |
|||
float dPupil = ellipse4(pupilE, uv); |
|||
float pupilEdge = 1.0 - smoothstep(0, .035, dPupil); |
|||
float highlight = ellipse4(highlightEllipse, uv); |
|||
float highlightEdge = smoothstep(0, .05, highlight); |
|||
vec4 r1 = rim1Ellipse; |
|||
vec4 r2 = rim2Ellipse; |
|||
r1.x *= flipRims; |
|||
r2.x *= flipRims; |
|||
r1.xy += irisE.xy; |
|||
r2.xy += irisE.xy; |
|||
float dRim1 = ellipse4(r1, rotate(uv, rim1RotationDegrees * flipRims, r1.xy)); |
|||
float rim1Edge = hardEdge(dRim1 / dScale + epsilon); |
|||
float dRim2 = ellipse4(r2, rotate(uv, rim2RotationDegrees * flipRims, r2.xy)); |
|||
float rim2Edge = hardEdge(dRim2 / dScale + epsilon); |
|||
vec4 col = vec4(0, 0, 0, 0); |
|||
col = mix(col, whiteColor, shapeEdge); |
|||
col = mix(col, color, irisEdge); |
|||
col = mix(col, color * irisAttenuation, pupilEdge); |
|||
col = mix(col, col * irisAttenuation, irisGradient); |
|||
col = mix(col, col * attenuation, highlightEdge); |
|||
col = mix(col, rimColor, max(rim1Edge, rim2Edge)); |
|||
col = mix(col, border1Color, border1Edge); |
|||
col = mix(col, border2Color, border2Edge); |
|||
col.a = max(max(shapeEdge, border1Edge), border2Edge); |
|||
return col; |
|||
} |
|||
|
|||
// maps uvs that fall into area (x, y, width, height) to 0.0-1.0 - this way functions don't need |
|||
// to be aware of position and scale |
|||
vec2 toLocal(vec2 uv, vec4 area) { |
|||
return (uv - area.xy) / area.zw + .5; |
|||
} |
|||
|
|||
void fragment() { |
|||
// this is used to scale smoothsteps so it's equally smooth regardless of distance. |
|||
// if I didn't do this, it would become blurry close-up and aliased from afar |
|||
float dScale = abs(VERTEX.z) / scale.x; |
|||
vec2 uv = toLocal(UV, uvArea); |
|||
uv = (uv - .5) / vec2(uvArea.z / uvArea.w, 1) + .5; // adjust for uvArea aspect ratio |
|||
dScale /= uvArea.z; |
|||
vec3 look = normalize(lookAt); |
|||
look.xy *= lookSens; |
|||
look.xy = clamp(look.xy, maxLook.xy, maxLook.zw); |
|||
look.x *= -1.; |
|||
vec4 right = eye(1, toLocal(uv, vec4(.5 - dist, position, scale.x, scale.y)), look.xy, dScale); |
|||
look.x *= -1.; |
|||
vec4 left = eye(-1, toLocal(uv, vec4(.5 + dist, position, -scale.x, scale.y)), look.xy, dScale); |
|||
float browpos = eyebrowOffset + eyebrowPosition; |
|||
float browR = brow(toLocal(uv, vec4(.5 - dist, browpos, scale.x, scale.y)), dScale); |
|||
float browL = brow(toLocal(uv, vec4(.5 + dist, browpos, -scale.x, scale.y)), dScale); |
|||
vec4 col = mix(right, left, left.a); |
|||
col = mix(col, eyebrowColor, max(browR, browL)); |
|||
ALPHA = col.a; |
|||
ALBEDO = col.rgb; |
|||
// adjust depth to render through hair |
|||
vec4 fragpos = FRAGCOORD * INV_PROJECTION_MATRIX; |
|||
fragpos.z += depthOffset; // view space Z |
|||
DEPTH = (fragpos * PROJECTION_MATRIX).z; |
|||
} |
Binary file not shown.
File diff suppressed because it is too large
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
@ -0,0 +1,36 @@ |
|||
[remap] |
|||
|
|||
importer="texture" |
|||
type="StreamTexture" |
|||
path.s3tc="res://.import/BlastTexture.png-c527c26bd9b5d1df74298d8ce80bc295.s3tc.stex" |
|||
metadata={ |
|||
"imported_formats": [ "s3tc" ], |
|||
"vram_texture": true |
|||
} |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://effects_shared/bullet/BlastTexture.png" |
|||
dest_files=[ "res://.import/BlastTexture.png-c527c26bd9b5d1df74298d8ce80bc295.s3tc.stex" ] |
|||
|
|||
[params] |
|||
|
|||
compress/mode=2 |
|||
compress/lossy_quality=0.7 |
|||
compress/hdr_mode=0 |
|||
compress/bptc_ldr=0 |
|||
compress/normal_map=0 |
|||
flags/repeat=true |
|||
flags/filter=true |
|||
flags/mipmaps=true |
|||
flags/anisotropic=false |
|||
flags/srgb=1 |
|||
process/fix_alpha_border=true |
|||
process/premult_alpha=false |
|||
process/HDR_as_SRGB=false |
|||
process/invert_color=false |
|||
process/normal_map_invert_y=false |
|||
stream=false |
|||
size_limit=0 |
|||
detect_3d=false |
|||
svg/scale=1.0 |
@ -0,0 +1,58 @@ |
|||
[gd_resource type="ShaderMaterial" load_steps=3 format=2] |
|||
|
|||
[ext_resource path="res://effects_shared/bullet/BlastTexture.png" type="Texture" id=1] |
|||
|
|||
[sub_resource type="Shader" id=1] |
|||
code = "shader_type spatial; |
|||
render_mode blend_mix,depth_draw_never,cull_back,diffuse_burley,specular_schlick_ggx; |
|||
uniform vec4 albedo : hint_color; |
|||
uniform sampler2D texture_albedo : hint_albedo; |
|||
uniform float specular; |
|||
uniform float metallic; |
|||
uniform float roughness : hint_range(0,1); |
|||
uniform float point_size : hint_range(0,128); |
|||
uniform int particles_anim_h_frames; |
|||
uniform int particles_anim_v_frames; |
|||
uniform bool particles_anim_loop; |
|||
uniform vec3 uv1_scale; |
|||
uniform vec3 uv1_offset; |
|||
uniform vec3 uv2_scale; |
|||
uniform vec3 uv2_offset; |
|||
|
|||
|
|||
void vertex() { |
|||
UV=UV*uv1_scale.xy+uv1_offset.xy; |
|||
mat4 mat_world = mat4(normalize(CAMERA_MATRIX[0])*length(WORLD_MATRIX[0]),normalize(CAMERA_MATRIX[1])*length(WORLD_MATRIX[0]),normalize(CAMERA_MATRIX[2])*length(WORLD_MATRIX[2]),WORLD_MATRIX[3]); |
|||
mat_world = mat_world * mat4( vec4(cos(INSTANCE_CUSTOM.x),-sin(INSTANCE_CUSTOM.x), 0.0, 0.0), vec4(sin(INSTANCE_CUSTOM.x), cos(INSTANCE_CUSTOM.x), 0.0, 0.0),vec4(0.0, 0.0, 1.0, 0.0),vec4(0.0, 0.0, 0.0, 1.0)); |
|||
MODELVIEW_MATRIX = INV_CAMERA_MATRIX * mat_world; |
|||
} |
|||
|
|||
|
|||
void fragment() { |
|||
vec2 base_uv = UV; |
|||
vec4 albedo_tex = texture(texture_albedo,base_uv); |
|||
albedo_tex *= COLOR; |
|||
ALBEDO = albedo.rgb * albedo_tex.rgb * COLOR.rgb; |
|||
EMISSION = albedo.rgb * albedo.a * 1.0 * COLOR.rgb * COLOR.a; |
|||
METALLIC = metallic; |
|||
ROUGHNESS = roughness; |
|||
SPECULAR = specular; |
|||
ALPHA = albedo_tex.a * COLOR.a; |
|||
} |
|||
" |
|||
|
|||
[resource] |
|||
shader = SubResource( 1 ) |
|||
shader_param/albedo = Color( 0, 1, 1, 1 ) |
|||
shader_param/specular = 0.0 |
|||
shader_param/metallic = 0.0 |
|||
shader_param/roughness = 1.0 |
|||
shader_param/point_size = 1.0 |
|||
shader_param/particles_anim_h_frames = 1 |
|||
shader_param/particles_anim_v_frames = 1 |
|||
shader_param/particles_anim_loop = false |
|||
shader_param/uv1_scale = Vector3( 1, 1, 1 ) |
|||
shader_param/uv1_offset = Vector3( 0, 0, 0 ) |
|||
shader_param/uv2_scale = Vector3( 1, 1, 1 ) |
|||
shader_param/uv2_offset = Vector3( 0, 0, 0 ) |
|||
shader_param/texture_albedo = ExtResource( 1 ) |
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,36 @@ |
|||
[remap] |
|||
|
|||
importer="texture" |
|||
type="StreamTexture" |
|||
path.s3tc="res://.import/BlastSpark.png-6abcee349e2987154845483c37251625.s3tc.stex" |
|||
metadata={ |
|||
"imported_formats": [ "s3tc" ], |
|||
"vram_texture": true |
|||
} |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://effects_shared/bullet/effect/BlastSpark.png" |
|||
dest_files=[ "res://.import/BlastSpark.png-6abcee349e2987154845483c37251625.s3tc.stex" ] |
|||
|
|||
[params] |
|||
|
|||
compress/mode=2 |
|||
compress/lossy_quality=0.7 |
|||
compress/hdr_mode=0 |
|||
compress/bptc_ldr=0 |
|||
compress/normal_map=0 |
|||
flags/repeat=true |
|||
flags/filter=true |
|||
flags/mipmaps=true |
|||
flags/anisotropic=false |
|||
flags/srgb=1 |
|||
process/fix_alpha_border=true |
|||
process/premult_alpha=false |
|||
process/HDR_as_SRGB=false |
|||
process/invert_color=false |
|||
process/normal_map_invert_y=false |
|||
stream=false |
|||
size_limit=0 |
|||
detect_3d=false |
|||
svg/scale=1.0 |
@ -0,0 +1,26 @@ |
|||
[gd_resource type="ParticlesMaterial" load_steps=5 format=2] |
|||
|
|||
[sub_resource type="Gradient" id=17] |
|||
offsets = PoolRealArray( 0, 0.237037, 0.859259 ) |
|||
colors = PoolColorArray( 1, 1, 1, 1, 0, 0.972656, 0.972656, 0.967582, 0.0107751, 0.00360107, 0.921875, 0.478431 ) |
|||
|
|||
[sub_resource type="GradientTexture" id=18] |
|||
gradient = SubResource( 17 ) |
|||
width = 128 |
|||
|
|||
[sub_resource type="Curve" id=19] |
|||
_data = [ Vector2( 0, 1 ), 0.0, -1.96199e-07, 0, 0, Vector2( 0.848101, 0.781818 ), -1.30578, -1.30578, 0, 0, Vector2( 1, 0.0090909 ), -0.0813035, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=20] |
|||
width = 128 |
|||
curve = SubResource( 19 ) |
|||
|
|||
[resource] |
|||
flag_align_y = true |
|||
direction = Vector3( 0, 1, 0 ) |
|||
spread = 151.58 |
|||
gravity = Vector3( 0, 0, 0 ) |
|||
initial_velocity = 12.0 |
|||
damping = 31.5 |
|||
scale_curve = SubResource( 20 ) |
|||
color_ramp = SubResource( 18 ) |
After Width: | Height: | Size: 47 KiB |
@ -0,0 +1,36 @@ |
|||
[remap] |
|||
|
|||
importer="texture" |
|||
type="StreamTexture" |
|||
path.s3tc="res://.import/FlarePolar.png-62b323305bf480f361cf2ea871ca1be9.s3tc.stex" |
|||
metadata={ |
|||
"imported_formats": [ "s3tc" ], |
|||
"vram_texture": true |
|||
} |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://effects_shared/bullet/effect/FlarePolar.png" |
|||
dest_files=[ "res://.import/FlarePolar.png-62b323305bf480f361cf2ea871ca1be9.s3tc.stex" ] |
|||
|
|||
[params] |
|||
|
|||
compress/mode=2 |
|||
compress/lossy_quality=0.7 |
|||
compress/hdr_mode=0 |
|||
compress/bptc_ldr=0 |
|||
compress/normal_map=0 |
|||
flags/repeat=true |
|||
flags/filter=true |
|||
flags/mipmaps=true |
|||
flags/anisotropic=false |
|||
flags/srgb=1 |
|||
process/fix_alpha_border=true |
|||
process/premult_alpha=false |
|||
process/HDR_as_SRGB=false |
|||
process/invert_color=false |
|||
process/normal_map_invert_y=false |
|||
stream=false |
|||
size_limit=0 |
|||
detect_3d=false |
|||
svg/scale=1.0 |
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,35 @@ |
|||
[remap] |
|||
|
|||
importer="texture" |
|||
type="StreamTexture" |
|||
path="res://.import/FlareStraight.png-482a1c66e3d92a3e71190d2bffbb48c0.stex" |
|||
metadata={ |
|||
"vram_texture": false |
|||
} |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://effects_shared/bullet/effect/FlareStraight.png" |
|||
dest_files=[ "res://.import/FlareStraight.png-482a1c66e3d92a3e71190d2bffbb48c0.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 |
|||
process/normal_map_invert_y=false |
|||
stream=false |
|||
size_limit=0 |
|||
detect_3d=true |
|||
svg/scale=1.0 |
@ -0,0 +1,12 @@ |
|||
[gd_resource type="ParticlesMaterial" load_steps=3 format=2] |
|||
|
|||
[sub_resource type="Curve" id=39] |
|||
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.379747, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=40] |
|||
width = 128 |
|||
curve = SubResource( 39 ) |
|||
|
|||
[resource] |
|||
gravity = Vector3( 0, 0, 0 ) |
|||
scale_curve = SubResource( 40 ) |
@ -0,0 +1,29 @@ |
|||
[gd_resource type="ParticlesMaterial" load_steps=5 format=2] |
|||
|
|||
[sub_resource type="Curve" id=33] |
|||
min_value = -1.0 |
|||
_data = [ Vector2( 0, 0.0181819 ), 0.0, 0.0, 0, 0, Vector2( 1, -0.745454 ), 0.0, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=34] |
|||
width = 128 |
|||
curve = SubResource( 33 ) |
|||
|
|||
[sub_resource type="Curve" id=35] |
|||
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.746835, 1 ), 2.15455, -3.73455, 0, 1, Vector2( 1, 0.0545454 ), 0.0, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=36] |
|||
width = 128 |
|||
curve = SubResource( 35 ) |
|||
|
|||
[resource] |
|||
emission_shape = 1 |
|||
emission_sphere_radius = 0.3 |
|||
direction = Vector3( 0, 1, 0 ) |
|||
spread = 180.0 |
|||
gravity = Vector3( 0, 3, 0 ) |
|||
initial_velocity = 0.3 |
|||
radial_accel = 1.0 |
|||
radial_accel_curve = SubResource( 34 ) |
|||
scale = 1.5 |
|||
scale_random = 1.0 |
|||
scale_curve = SubResource( 36 ) |
@ -0,0 +1,21 @@ |
|||
[gd_resource type="ParticlesMaterial" load_steps=5 format=2] |
|||
|
|||
[sub_resource type="Gradient" id=43] |
|||
colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 ) |
|||
|
|||
[sub_resource type="GradientTexture" id=44] |
|||
gradient = SubResource( 43 ) |
|||
|
|||
[sub_resource type="Curve" id=45] |
|||
max_value = 4.0 |
|||
_data = [ Vector2( 0.150987, 4 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.6936 ), 0.0, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=46] |
|||
curve = SubResource( 45 ) |
|||
|
|||
[resource] |
|||
spread = 180.0 |
|||
gravity = Vector3( 0, -1, 0 ) |
|||
scale = 0.3 |
|||
scale_curve = SubResource( 46 ) |
|||
color_ramp = SubResource( 44 ) |
@ -0,0 +1,16 @@ |
|||
[gd_resource type="SpatialMaterial" load_steps=2 format=2] |
|||
|
|||
[ext_resource path="res://player/bullet/blue_myst.png" type="Texture" id=1] |
|||
|
|||
[resource] |
|||
flags_transparent = true |
|||
vertex_color_use_as_albedo = true |
|||
params_cull_mode = 2 |
|||
params_depth_draw_mode = 2 |
|||
params_billboard_mode = 3 |
|||
params_billboard_keep_scale = true |
|||
particles_anim_h_frames = 1 |
|||
particles_anim_v_frames = 1 |
|||
particles_anim_loop = false |
|||
albedo_color = Color( 0.701961, 0.701961, 0.701961, 0.560784 ) |
|||
albedo_texture = ExtResource( 1 ) |
@ -0,0 +1,36 @@ |
|||
[gd_resource type="ParticlesMaterial" load_steps=7 format=2] |
|||
|
|||
[sub_resource type="Curve" id=24] |
|||
min_value = -1.0 |
|||
_data = [ Vector2( 0, 0.890909 ), 0.0, 0.0, 0, 0, Vector2( 1, -0.0545454 ), 0.0, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=25] |
|||
width = 128 |
|||
curve = SubResource( 24 ) |
|||
|
|||
[sub_resource type="Gradient" id=26] |
|||
offsets = PoolRealArray( 0, 0.918519 ) |
|||
colors = PoolColorArray( 1, 1, 1, 0.8, 0, 0.309753, 0.792969, 0.0196078 ) |
|||
|
|||
[sub_resource type="GradientTexture" id=27] |
|||
gradient = SubResource( 26 ) |
|||
width = 128 |
|||
|
|||
[sub_resource type="Curve" id=28] |
|||
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.14557, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), -3.50114, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=29] |
|||
width = 128 |
|||
curve = SubResource( 28 ) |
|||
|
|||
[resource] |
|||
emission_shape = 1 |
|||
emission_sphere_radius = 0.4 |
|||
gravity = Vector3( 0, 2, 0 ) |
|||
angular_velocity = 82.76 |
|||
angular_velocity_random = 0.53 |
|||
angular_velocity_curve = SubResource( 25 ) |
|||
angle = -248.2 |
|||
angle_random = 0.44 |
|||
scale_curve = SubResource( 29 ) |
|||
color_ramp = SubResource( 27 ) |
@ -0,0 +1,28 @@ |
|||
[gd_resource type="ParticlesMaterial" load_steps=5 format=2] |
|||
|
|||
[sub_resource type="Gradient" id=50] |
|||
colors = PoolColorArray( 1, 1, 1, 1, 0, 0.0313726, 0.501961, 0.752941 ) |
|||
|
|||
[sub_resource type="GradientTexture" id=51] |
|||
gradient = SubResource( 50 ) |
|||
width = 128 |
|||
|
|||
[sub_resource type="Curve" id=52] |
|||
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.417722, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=53] |
|||
width = 128 |
|||
curve = SubResource( 52 ) |
|||
|
|||
[resource] |
|||
emission_shape = 1 |
|||
emission_sphere_radius = 0.1 |
|||
flag_align_y = true |
|||
direction = Vector3( 0, 0, -1 ) |
|||
spread = 0.0 |
|||
gravity = Vector3( 0, 0, 0 ) |
|||
initial_velocity = 9.0 |
|||
damping = 9.0 |
|||
scale = 0.3 |
|||
scale_curve = SubResource( 53 ) |
|||
color_ramp = SubResource( 51 ) |
@ -0,0 +1,11 @@ |
|||
[gd_resource type="SpatialMaterial" load_steps=2 format=2] |
|||
|
|||
[ext_resource path="res://effects_shared/bullet/effect/FlarePolar.png" type="Texture" id=1] |
|||
|
|||
[resource] |
|||
flags_transparent = true |
|||
flags_unshaded = true |
|||
vertex_color_use_as_albedo = true |
|||
params_billboard_mode = 1 |
|||
params_billboard_keep_scale = true |
|||
albedo_texture = ExtResource( 1 ) |
Binary file not shown.
File diff suppressed because it is too large
Binary file not shown.
Binary file not shown.
@ -0,0 +1,21 @@ |
|||
[remap] |
|||
|
|||
importer="wav" |
|||
type="AudioStreamSample" |
|||
path="res://.import/jump.wav-7da1ee513bc08bdb8de7368683f83a8f.sample" |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://enemies/bad_cat/audio/jump.wav" |
|||
dest_files=[ "res://.import/jump.wav-7da1ee513bc08bdb8de7368683f83a8f.sample" ] |
|||
|
|||
[params] |
|||
|
|||
force/8_bit=false |
|||
force/mono=false |
|||
force/max_rate=false |
|||
force/max_rate_hz=44100 |
|||
edit/trim=true |
|||
edit/normalize=true |
|||
edit/loop=false |
|||
compress/mode=0 |
Binary file not shown.
@ -0,0 +1,21 @@ |
|||
[remap] |
|||
|
|||
importer="wav" |
|||
type="AudioStreamSample" |
|||
path="res://.import/land.wav-b0953dafa50529bde0f15882cfc8634f.sample" |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://enemies/bad_cat/audio/land.wav" |
|||
dest_files=[ "res://.import/land.wav-b0953dafa50529bde0f15882cfc8634f.sample" ] |
|||
|
|||
[params] |
|||
|
|||
force/8_bit=false |
|||
force/mono=false |
|||
force/max_rate=false |
|||
force/max_rate_hz=44100 |
|||
edit/trim=true |
|||
edit/normalize=true |
|||
edit/loop=false |
|||
compress/mode=0 |
Binary file not shown.
@ -0,0 +1,21 @@ |
|||
[remap] |
|||
|
|||
importer="wav" |
|||
type="AudioStreamSample" |
|||
path="res://.import/shoot.wav-a1925bc236c059a9752e02a1e62106dd.sample" |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://enemies/bad_cat/audio/shoot.wav" |
|||
dest_files=[ "res://.import/shoot.wav-a1925bc236c059a9752e02a1e62106dd.sample" ] |
|||
|
|||
[params] |
|||
|
|||
force/8_bit=false |
|||
force/mono=false |
|||
force/max_rate=false |
|||
force/max_rate_hz=44100 |
|||
edit/trim=true |
|||
edit/normalize=true |
|||
edit/loop=false |
|||
compress/mode=0 |
Binary file not shown.
@ -0,0 +1,21 @@ |
|||
[remap] |
|||
|
|||
importer="wav" |
|||
type="AudioStreamSample" |
|||
path="res://.import/step.wav-197836f56b95238920bd13064a10b2bf.sample" |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://enemies/bad_cat/audio/step.wav" |
|||
dest_files=[ "res://.import/step.wav-197836f56b95238920bd13064a10b2bf.sample" ] |
|||
|
|||
[params] |
|||
|
|||
force/8_bit=false |
|||
force/mono=false |
|||
force/max_rate=false |
|||
force/max_rate_hz=44100 |
|||
edit/trim=true |
|||
edit/normalize=false |
|||
edit/loop=false |
|||
compress/mode=0 |
@ -0,0 +1,8 @@ |
|||
[gd_resource type="AudioStreamRandomPitch" load_steps=2 format=2] |
|||
|
|||
[ext_resource path="res://player/audio/step.wav" type="AudioStream" id=1] |
|||
|
|||
[resource] |
|||
|
|||
audio_stream = ExtResource( 1 ) |
|||
random_pitch = 1.1 |
@ -0,0 +1,169 @@ |
|||
extends KinematicBody |
|||
|
|||
enum State { |
|||
APPROACH = 0, |
|||
AIM = 1, |
|||
SHOOTING = 2, |
|||
} |
|||
|
|||
const PLAYER_AIM_TOLERANCE_DEGREES = 15 |
|||
|
|||
const SHOOT_WAIT = 0.5 |
|||
const AIM_TIME = 1 |
|||
|
|||
const AIM_PREPARE_TIME = 0.5 |
|||
const BLEND_AIM_SPEED = 0.05 |
|||
|
|||
export(int) var health = 5 |
|||
export(bool) var test_shoot = false |
|||
|
|||
var state = State.APPROACH |
|||
|
|||
var shoot_countdown = SHOOT_WAIT |
|||
var aim_countdown = AIM_TIME |
|||
var aim_preparing = AIM_PREPARE_TIME |
|||
var dead = false |
|||
|
|||
var player = null |
|||
var velocity = Vector3() |
|||
var orientation = Transform() |
|||
|
|||
|
|||
const ROTATION_INTERPOLATE_SPEED = 0.025 |
|||
|
|||
var root_motion = Transform() |
|||
var motion = Vector2() |
|||
|
|||
var last_player_sighting = Vector3() |
|||
|
|||
onready var initial_position = transform.origin |
|||
onready var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") * ProjectSettings.get_setting("physics/3d/default_gravity_vector") |
|||
|
|||
onready var animation_tree = $AnimationTree |
|||
onready var player_model = $PlayerModel |
|||
onready var shoot_from = player_model.get_node(@"Colette_Armature/Skeleton/GunBone/ShootFrom") |
|||
onready var fire_cooldown = $FireCooldown |
|||
onready var collision_shape = $CapsuleShape |
|||
|
|||
onready var sound_effects = $SoundEffects |
|||
onready var sound_effect_jump = sound_effects.get_node(@"Jump") |
|||
onready var sound_effect_land = sound_effects.get_node(@"Land") |
|||
onready var sound_effect_shoot = sound_effects.get_node(@"Shoot") |
|||
onready var explosion_sound = sound_effects.get_node(@"Explosion") |
|||
onready var hit_sound = sound_effects.get_node(@"Hit") |
|||
|
|||
onready var debug_marker = $debug_marker |
|||
|
|||
func _ready(): |
|||
# Pre-initialize orientation transform. |
|||
orientation = player_model.global_transform |
|||
orientation.origin = Vector3() |
|||
|
|||
func _physics_process(delta): |
|||
if dead: |
|||
return |
|||
|
|||
if player != null and fire_cooldown.time_left == 0: |
|||
# See if player can be killed because in they're sight. |
|||
var ray_origin = shoot_from.global_transform.origin |
|||
var ray_to = player.global_transform.origin + Vector3.UP # Above middle of player. |
|||
var col = get_world().direct_space_state.intersect_ray(ray_origin, ray_to, [self], 0b111) |
|||
# If our raycast hit a player |
|||
if not col.empty() and col.collider == player: |
|||
# Record last sighting (in case they hide later) |
|||
last_player_sighting = ray_to |
|||
|
|||
state = State.AIM |
|||
aim_countdown = AIM_TIME |
|||
aim_preparing = 0 |
|||
animation_tree["parameters/state/current"] = 1 |
|||
|
|||
# If the player is detected by at too large an angle, slerp rotate towards them |
|||
var to_player_local = global_transform.xform_inv(player.global_transform.origin) |
|||
# The front of this is +Z, and atan2 is zero at +X, so we need to use the Z for the X parameter (second one). |
|||
var angle_to_player = atan2(to_player_local.x, to_player_local.z) |
|||
var tolerance = deg2rad(PLAYER_AIM_TOLERANCE_DEGREES) |
|||
if angle_to_player > tolerance: |
|||
lerp_to_face_player(angle_to_player, ROTATION_INTERPOLATE_SPEED) |
|||
debug_marker.global_transform.origin = self.global_transform.origin + (self.transform.basis.z * 3) |
|||
elif angle_to_player < -tolerance: |
|||
lerp_to_face_player(angle_to_player, ROTATION_INTERPOLATE_SPEED) |
|||
debug_marker.global_transform.origin = self.global_transform.origin + (self.transform.basis.z * 3) |
|||
else: |
|||
# Facing player, try to shoot. |
|||
self.look_at(ray_to, Vector3.UP) |
|||
self.rotate_object_local(Vector3.UP, PI) |
|||
|
|||
var bullet = preload("res://player/bullet/bullet.tscn").instance() |
|||
get_parent().add_child(bullet) |
|||
bullet.global_transform.origin = ray_origin |
|||
# If we don't rotate the bullets there is no useful way to control the particles .. |
|||
bullet.look_at(ray_to, Vector3.UP) |
|||
bullet.add_collision_exception_with(self) |
|||
var shoot_particle = $PlayerModel/Colette_Armature/Skeleton/GunBone/ShootFrom/ShootParticle |
|||
shoot_particle.restart() |
|||
shoot_particle.emitting = true |
|||
var muzzle_particle = $PlayerModel/Colette_Armature/Skeleton/GunBone/ShootFrom/MuzzleFlash |
|||
muzzle_particle.restart() |
|||
muzzle_particle.emitting = true |
|||
fire_cooldown.start() |
|||
sound_effect_shoot.play() |
|||
|
|||
# Player not in sight. |
|||
shoot_countdown = SHOOT_WAIT |
|||
|
|||
# Run at their last known position |
|||
if last_player_sighting != Vector3(): |
|||
|
|||
# If the player is detected by at too large an angle, slerp rotate towards them |
|||
var to_player_local = global_transform.xform_inv(last_player_sighting) |
|||
# The front of this is +Z, and atan2 is zero at +X, so we need to use the Z for the X parameter (second one). |
|||
var angle_to_player = atan2(to_player_local.x, to_player_local.z) |
|||
var tolerance = deg2rad(PLAYER_AIM_TOLERANCE_DEGREES) |
|||
if angle_to_player > tolerance: |
|||
lerp_to_face_player(angle_to_player, ROTATION_INTERPOLATE_SPEED) |
|||
debug_marker.global_transform.origin = self.global_transform.origin + (self.transform.basis.z * 3) |
|||
elif angle_to_player < -tolerance: |
|||
lerp_to_face_player(angle_to_player, ROTATION_INTERPOLATE_SPEED) |
|||
debug_marker.global_transform.origin = self.global_transform.origin + (self.transform.basis.z * 3) |
|||
|
|||
animation_tree["parameters/state/current"] = 2 |
|||
# Blend position for walk speed based on motion. |
|||
|
|||
# Run animation straight forward, high speed |
|||
animation_tree["parameters/walk/blend_position"] = Vector2(0.5, 0) |
|||
|
|||
# move in XY direction facing |
|||
root_motion = global_transform.basis.z * 3# * delta |
|||
move_and_slide(root_motion.length() * self.transform.basis.z * Vector3(1,0,1), Vector3.UP) |
|||
if get_slide_count() == 0: |
|||
move_and_slide(Vector3.DOWN * 9.8, Vector3.UP) |
|||
|
|||
# else: # Not in air or aiming, idle. |
|||
|
|||
func lerp_to_face_player(angle_to_player, rot_speed): |
|||
var langle = lerp_angle(0, angle_to_player, rot_speed) |
|||
# restrict to Y axis (no vertical rotation) |
|||
self.global_transform.basis = Basis(Vector3(0, 1, 0), langle) * self.global_transform.basis |
|||
|
|||
func hit(col): |
|||
health -= 1 |
|||
if health <= 0: |
|||
dead = true |
|||
animation_tree.active = false |
|||
player_model.visible = false |
|||
collision_shape.disabled = true |
|||
explosion_sound.play() |
|||
self.queue_free() # delete self |
|||
hit_sound.play() |
|||
|
|||
func _on_Area_body_entered(body): |
|||
if body.name == "Player" or body.name == "Target": |
|||
player = body |
|||
animation_tree["parameters/idle_aim/current"] = 1 |
|||
|
|||
|
|||
func _on_Area_body_exited(body): |
|||
if body.name == "Player": |
|||
player = null |
|||
animation_tree["parameters/idle_aim/current"] = 0 |
@ -0,0 +1,311 @@ |
|||
[gd_scene load_steps=50 format=2] |
|||
|
|||
[ext_resource path="res://enemies/bad_cat/bad_cat.gd" type="Script" id=1] |
|||
[ext_resource path="res://enemies/bad_cat/model/Colette_Head.material" type="Material" id=2] |
|||
[ext_resource path="res://enemies/common/audio/hit.wav" type="AudioStream" id=3] |
|||
[ext_resource path="res://player/audio/step_random_pitch.tres" type="AudioStream" id=4] |
|||
[ext_resource path="res://player/audio/jump.wav" type="AudioStream" id=5] |
|||
[ext_resource path="res://player/audio/land.wav" type="AudioStream" id=6] |
|||
[ext_resource path="res://player/audio/shoot.wav" type="AudioStream" id=7] |
|||
[ext_resource path="res://enemies/common/audio/explosion.wav" type="AudioStream" id=8] |
|||
[ext_resource path="res://player/bullet/bullet_material.tres" type="Material" id=9] |
|||
[ext_resource path="res://enemies/bad_cat/model/muzzle_flash_particle_mesh_Cone.mesh" type="ArrayMesh" id=10] |
|||
[ext_resource path="res://effects_shared/bullet/effect/FlarePolar.png" type="Texture" id=11] |
|||
[ext_resource path="res://enemies/bad_cat/textures/animu_alunya_shadermat.tres" type="Material" id=12] |
|||
[ext_resource path="res://player/model/Alunya.glb" type="PackedScene" id=13] |
|||
[ext_resource path="res://enemies/bad_cat/model/Colette_Hair.material" type="Material" id=14] |
|||
[ext_resource path="res://enemies/bad_cat/model/Bandana.material" type="Material" id=15] |
|||
[ext_resource path="res://enemies/common/Hitbox.gd" type="Script" id=16] |
|||
[ext_resource path="res://player/model/materials/ear.tres" type="Material" id=17] |
|||
[ext_resource path="res://enemies/bad_cat/model/Colette_Body.material" type="Material" id=18] |
|||
|
|||
[sub_resource type="ParticlesMaterial" id=1] |
|||
flag_align_y = true |
|||
direction = Vector3( 0, 0, -1 ) |
|||
spread = 15.0 |
|||
gravity = Vector3( 0, -3, 0 ) |
|||
initial_velocity = 3.0 |
|||
|
|||
[sub_resource type="SphereMesh" id=2] |
|||
radius = 0.003 |
|||
height = 0.02 |
|||
|
|||
[sub_resource type="SpatialMaterial" id=3] |
|||
flags_transparent = true |
|||
flags_unshaded = true |
|||
vertex_color_use_as_albedo = true |
|||
params_cull_mode = 2 |
|||
albedo_texture = ExtResource( 11 ) |
|||
|
|||
[sub_resource type="Gradient" id=4] |
|||
offsets = PoolRealArray( 0.325926, 1 ) |
|||
colors = PoolColorArray( 0.0507812, 0.955505, 1, 1, 0.875, 0.888672, 1, 0.305882 ) |
|||
|
|||
[sub_resource type="GradientTexture" id=42] |
|||
gradient = SubResource( 4 ) |
|||
width = 32 |
|||
|
|||
[sub_resource type="Curve" id=6] |
|||
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 0.791139, 0.990909 ), 0.0, 0.0, 0, 0, Vector2( 1, 0 ), 0.0, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=43] |
|||
width = 64 |
|||
curve = SubResource( 6 ) |
|||
|
|||
[sub_resource type="ParticlesMaterial" id=8] |
|||
gravity = Vector3( 0, 0, 0 ) |
|||
angle = -4.0 |
|||
angle_random = 1.0 |
|||
scale = 0.3 |
|||
scale_curve = SubResource( 43 ) |
|||
color_ramp = SubResource( 42 ) |
|||
|
|||
[sub_resource type="CapsuleShape" id=41] |
|||
radius = 0.253575 |
|||
height = 0.808991 |
|||
|
|||
[sub_resource type="AnimationNodeBlend2" id=69] |
|||
filter_enabled = true |
|||
filters = [ "Colette_Armature/Skeleton:ElbowF.R", "Colette_Armature/Skeleton:ElbowM.R", "Colette_Armature/Skeleton:ElbowU.R", "Colette_Armature/Skeleton:F_Index_1.R", "Colette_Armature/Skeleton:F_Index_2.R", "Colette_Armature/Skeleton:F_Index_3.R", "Colette_Armature/Skeleton:F_Index_4.R", "Colette_Armature/Skeleton:F_Middle_1.R", "Colette_Armature/Skeleton:F_Middle_2.R", "Colette_Armature/Skeleton:F_Middle_3.R", "Colette_Armature/Skeleton:F_Middle_4.R", "Colette_Armature/Skeleton:F_Pinky_1.R", "Colette_Armature/Skeleton:F_Pinky_2.R", "Colette_Armature/Skeleton:F_Pinky_3.R", "Colette_Armature/Skeleton:F_Pinky_4.R", "Colette_Armature/Skeleton:F_Ring_1.R", "Colette_Armature/Skeleton:F_Ring_2.R", "Colette_Armature/Skeleton:F_Ring_3.R", "Colette_Armature/Skeleton:F_Ring_4.R", "Colette_Armature/Skeleton:F_Thumb_1.R", "Colette_Armature/Skeleton:F_Thumb_2.R", "Colette_Armature/Skeleton:F_Thumb_3.R", "Colette_Armature/Skeleton:ForeArm.R", "Colette_Armature/Skeleton:ForeArmSkin1.R", "Colette_Armature/Skeleton:ForeArmSkin2.R", "Colette_Armature/Skeleton:ForeArmSkin3.R", "Colette_Armature/Skeleton:Hand.R", "Colette_Armature/Skeleton:HandMark_IK_FK.R", "Colette_Armature/Skeleton:Shoulder.R", "Colette_Armature/Skeleton:UpperArm.R", "Colette_Armature/Skeleton:UpperArmSkin1.R", "Colette_Armature/Skeleton:UpperArmSkin2.R", "Colette_Armature/Skeleton:UpperArmSkin3.R" ] |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=39] |
|||
animation = "idle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=70] |
|||
animation = "idle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeTransition" id=68] |
|||
input_count = 2 |
|||
xfade_time = 0.2 |
|||
input_0/name = "idle" |
|||
input_0/auto_advance = false |
|||
input_1/name = "aim" |
|||
input_1/auto_advance = false |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=67] |
|||
animation = "aim_pistol-loop" |
|||
|
|||
[sub_resource type="AnimationNodeTransition" id=49] |
|||
resource_local_to_scene = true |
|||
input_count = 3 |
|||
xfade_time = 0.15 |
|||
input_0/name = "idle" |
|||
input_0/auto_advance = false |
|||
input_1/name = "strafe" |
|||
input_1/auto_advance = false |
|||
input_2/name = "walk" |
|||
input_2/auto_advance = false |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=71] |
|||
animation = "walking-cycle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=72] |
|||
animation = "walking-cycle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=73] |
|||
animation = "walking-cycle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=74] |
|||
animation = "run-cycle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=79] |
|||
animation = "idle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeBlendSpace2D" id=55] |
|||
resource_local_to_scene = true |
|||
blend_point_0/node = SubResource( 71 ) |
|||
blend_point_0/pos = Vector2( -1, 0 ) |
|||
blend_point_1/node = SubResource( 72 ) |
|||
blend_point_1/pos = Vector2( 0, -1 ) |
|||
blend_point_2/node = SubResource( 73 ) |
|||
blend_point_2/pos = Vector2( 1, 0 ) |
|||
blend_point_3/node = SubResource( 74 ) |
|||
blend_point_3/pos = Vector2( 0, 1 ) |
|||
blend_point_4/node = SubResource( 79 ) |
|||
blend_point_4/pos = Vector2( 0, 0 ) |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=76] |
|||
animation = "run-cycle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=78] |
|||
animation = "walking_gun-cycle" |
|||
|
|||
[sub_resource type="AnimationNodeAnimation" id=80] |
|||
animation = "idle-loop" |
|||
|
|||
[sub_resource type="AnimationNodeBlendSpace2D" id=60] |
|||
resource_local_to_scene = true |
|||
blend_point_0/node = SubResource( 76 ) |
|||
blend_point_0/pos = Vector2( 1, 0 ) |
|||
blend_point_1/node = SubResource( 78 ) |
|||
blend_point_1/pos = Vector2( 0, 1 ) |
|||
blend_point_2/node = SubResource( 80 ) |
|||
blend_point_2/pos = Vector2( 0, 0 ) |
|||
min_space = Vector2( 0, 0 ) |
|||
x_label = "speed" |
|||
y_label = "gun" |
|||
|
|||
[sub_resource type="AnimationNodeBlendTree" id=30] |
|||
resource_local_to_scene = true |
|||
graph_offset = Vector2( -937.444, 37.3194 ) |
|||
nodes/Blend2/node = SubResource( 69 ) |
|||
nodes/Blend2/position = Vector2( 460, 80 ) |
|||
nodes/idle/node = SubResource( 39 ) |
|||
nodes/idle/position = Vector2( -340, -20 ) |
|||
nodes/idle1/node = SubResource( 70 ) |
|||
nodes/idle1/position = Vector2( 20, -140 ) |
|||
nodes/idle_aim/node = SubResource( 68 ) |
|||
nodes/idle_aim/position = Vector2( 220, -80 ) |
|||
nodes/output/position = Vector2( 760, 120 ) |
|||
nodes/shoot_pose/node = SubResource( 67 ) |
|||
nodes/shoot_pose/position = Vector2( -20, -20 ) |
|||
nodes/state/node = SubResource( 49 ) |
|||
nodes/state/position = Vector2( -80, 120 ) |
|||
nodes/strafe/node = SubResource( 55 ) |
|||
nodes/strafe/position = Vector2( -640, 40 ) |
|||
nodes/walk/node = SubResource( 60 ) |
|||
nodes/walk/position = Vector2( -640, 200 ) |
|||
node_connections = [ "state", 0, "idle", "state", 1, "strafe", "state", 2, "walk", "output", 0, "Blend2", "Blend2", 0, "state", "Blend2", 1, "idle_aim", "idle_aim", 0, "idle1", "idle_aim", 1, "shoot_pose" ] |
|||
|
|||
[sub_resource type="CapsuleShape" id=64] |
|||
radius = 0.68932 |
|||
height = 0.002 |
|||
|
|||
[sub_resource type="AudioStreamRandomPitch" id=35] |
|||
audio_stream = ExtResource( 7 ) |
|||
|
|||
[sub_resource type="AudioStreamRandomPitch" id=38] |
|||
audio_stream = ExtResource( 3 ) |
|||
|
|||
[sub_resource type="SphereShape" id=36] |
|||
radius = 20.0 |
|||
|
|||
[sub_resource type="PrismMesh" id=37] |
|||
|
|||
[node name="BadCat" type="KinematicBody"] |
|||
collision_layer = 4 |
|||
collision_mask = 23 |
|||
script = ExtResource( 1 ) |
|||
|
|||
[node name="PlayerModel" parent="." instance=ExtResource( 13 )] |
|||
|
|||
[node name="GunBone" type="BoneAttachment" parent="PlayerModel/Colette_Armature/Skeleton" index="0"] |
|||
transform = Transform( -0.0209218, -0.185609, -0.982401, 0.0101222, -0.982548, 0.185422, -0.999672, -0.00606411, 0.0224358, -0.201483, 0.742031, -0.0377114 ) |
|||
bone_name = "Hand.R" |
|||
|
|||
[node name="ShootFrom" type="Position3D" parent="PlayerModel/Colette_Armature/Skeleton/GunBone"] |
|||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 0 ) |
|||
|
|||
[node name="ShootParticle" type="Particles" parent="PlayerModel/Colette_Armature/Skeleton/GunBone/ShootFrom"] |
|||
transform = Transform( 1, 2.04891e-08, 0, 3.21306e-08, 1, 5.58794e-09, 0, 0, 1, 0, 0, 0 ) |
|||
material_override = ExtResource( 9 ) |
|||
emitting = false |
|||
amount = 10 |
|||
lifetime = 0.3 |
|||
one_shot = true |
|||
explosiveness = 0.79 |
|||
local_coords = false |
|||
process_material = SubResource( 1 ) |
|||
draw_pass_1 = SubResource( 2 ) |
|||
|
|||
[node name="MuzzleFlash" type="Particles" parent="PlayerModel/Colette_Armature/Skeleton/GunBone/ShootFrom"] |
|||
transform = Transform( 1, 0, -2.00234e-08, 1.21072e-08, -4.37722e-08, -1, -2.98023e-08, 1, -4.74975e-08, 0, 0, 0 ) |
|||
material_override = SubResource( 3 ) |
|||
emitting = false |
|||
amount = 1 |
|||
lifetime = 0.1 |
|||
one_shot = true |
|||
explosiveness = 1.0 |
|||
process_material = SubResource( 8 ) |
|||
draw_pass_1 = ExtResource( 10 ) |
|||
|
|||
[node name="ChestBone" type="BoneAttachment" parent="PlayerModel/Colette_Armature/Skeleton" index="1"] |
|||
transform = Transform( 1, 9.83052e-08, -4.4973e-07, -9.24421e-08, 0.998489, -0.0538833, 3.5868e-07, 0.0538833, 0.998489, 6.63939e-09, 1.00081, 0.0376625 ) |
|||
bone_name = "Chest" |
|||
|
|||
[node name="Hitbox" type="KinematicBody" parent="PlayerModel/Colette_Armature/Skeleton/ChestBone"] |
|||
transform = Transform( 0.697, 4.07329e-05, 0.000196172, -2.55566e-05, 1.19195, 0.00618147, -0.000195948, -0.0105715, 0.696972, -7.45737e-05, -0.195816, -0.0145013 ) |
|||
collision_layer = 64 |
|||
collision_mask = 0 |
|||
script = ExtResource( 16 ) |
|||
node_with_hit = NodePath("../../../../..") |
|||
|
|||
[node name="CollisionShape" type="CollisionShape" parent="PlayerModel/Colette_Armature/Skeleton/ChestBone/Hitbox"] |
|||
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 ) |
|||
shape = SubResource( 41 ) |
|||
|
|||
[node name="Colette_Mesh" parent="PlayerModel/Colette_Armature/Skeleton" index="2"] |
|||
material/0 = ExtResource( 12 ) |
|||
material/1 = ExtResource( 12 ) |
|||
material/2 = ExtResource( 2 ) |
|||
material/3 = ExtResource( 18 ) |
|||
material/4 = ExtResource( 17 ) |
|||
material/5 = ExtResource( 14 ) |
|||
material/6 = ExtResource( 15 ) |
|||
|
|||
[node name="RootMotionView" type="RootMotionView" parent="."] |
|||
animation_path = NodePath("../AnimationTree") |
|||
|
|||
[node name="AnimationTree" type="AnimationTree" parent="."] |
|||
tree_root = SubResource( 30 ) |
|||
anim_player = NodePath("../PlayerModel/AnimationPlayer") |
|||
active = true |
|||
process_mode = 0 |
|||
root_motion_track = NodePath("Colette_Armature/Skeleton:Root") |
|||
parameters/Blend2/blend_amount = 1.0 |
|||
parameters/idle_aim/current = 0 |
|||
parameters/state/current = 0 |
|||
parameters/strafe/blend_position = Vector2( 0, 0 ) |
|||
parameters/walk/blend_position = Vector2( 0, 0 ) |
|||
|
|||
[node name="CapsuleShape" type="CollisionShape" parent="."] |
|||
transform = Transform( 0.999835, 0.0162343, -0.00821726, 0.0079643, 0.0155836, 0.999847, 0.0163598, -0.999747, 0.0154518, 0, 0.701, 0 ) |
|||
shape = SubResource( 64 ) |
|||
|
|||
[node name="SoundEffects" type="Node" parent="."] |
|||
|
|||
[node name="Step" type="AudioStreamPlayer" parent="SoundEffects"] |
|||
stream = ExtResource( 4 ) |
|||
|
|||
[node name="Jump" type="AudioStreamPlayer" parent="SoundEffects"] |
|||
stream = ExtResource( 5 ) |
|||
|
|||
[node name="Land" type="AudioStreamPlayer" parent="SoundEffects"] |
|||
stream = ExtResource( 6 ) |
|||
|
|||
[node name="Shoot" type="AudioStreamPlayer" parent="SoundEffects"] |
|||
stream = SubResource( 35 ) |
|||
|
|||
[node name="Explosion" type="AudioStreamPlayer3D" parent="SoundEffects"] |
|||
stream = ExtResource( 8 ) |
|||
unit_db = 12.0 |
|||
unit_size = 15.0 |
|||
|
|||
[node name="Hit" type="AudioStreamPlayer3D" parent="SoundEffects"] |
|||
stream = SubResource( 38 ) |
|||
unit_db = 3.0 |
|||
unit_size = 15.0 |
|||
|
|||
[node name="FireCooldown" type="Timer" parent="."] |
|||
wait_time = 0.4 |
|||
one_shot = true |
|||
autostart = true |
|||
|
|||
[node name="PlayerDetectionArea" type="Area" parent="."] |
|||
collision_layer = 2 |
|||
collision_mask = 2 |
|||
|
|||
[node name="CollisionShape" type="CollisionShape" parent="PlayerDetectionArea"] |
|||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00589287, -1.19209e-07, 0.000506759 ) |
|||
shape = SubResource( 36 ) |
|||
|
|||
[node name="debug_marker" type="MeshInstance" parent="."] |
|||
transform = Transform( 0.245, 0, 0, 0, 0.205, 0, 0, 0, 0.115, 0, 0, 3.06692 ) |
|||
visible = false |
|||
mesh = SubResource( 37 ) |
|||
material/0 = null |
|||
|
|||
[connection signal="body_entered" from="PlayerDetectionArea" to="." method="_on_Area_body_entered"] |
|||
[connection signal="body_exited" from="PlayerDetectionArea" to="." method="_on_Area_body_exited"] |
|||
|
|||
[editable path="PlayerModel"] |
After Width: | Height: | Size: 21 KiB |
@ -0,0 +1,36 @@ |
|||
[remap] |
|||
|
|||
importer="texture" |
|||
type="StreamTexture" |
|||
path.s3tc="res://.import/blue_myst.png-7727ef8a9a4fafec2d4a943494dcd294.s3tc.stex" |
|||
metadata={ |
|||
"imported_formats": [ "s3tc" ], |
|||
"vram_texture": true |
|||
} |
|||
|
|||
[deps] |
|||
|
|||
source_file="res://enemies/bad_cat/bullet/blue_myst.png" |
|||
dest_files=[ "res://.import/blue_myst.png-7727ef8a9a4fafec2d4a943494dcd294.s3tc.stex" ] |
|||
|
|||
[params] |
|||
|
|||
compress/mode=2 |
|||
compress/lossy_quality=0.7 |
|||
compress/hdr_mode=0 |
|||
compress/bptc_ldr=0 |
|||
compress/normal_map=0 |
|||
flags/repeat=true |
|||
flags/filter=true |
|||
flags/mipmaps=true |
|||
flags/anisotropic=false |
|||
flags/srgb=1 |
|||
process/fix_alpha_border=true |
|||
process/premult_alpha=false |
|||
process/HDR_as_SRGB=false |
|||
process/invert_color=false |
|||
process/normal_map_invert_y=false |
|||
stream=false |
|||
size_limit=0 |
|||
detect_3d=false |
|||
svg/scale=1.0 |
@ -0,0 +1,24 @@ |
|||
extends KinematicBody |
|||
|
|||
const BULLET_VELOCITY = 20 |
|||
|
|||
var time_alive = 5 |
|||
var hit = false |
|||
|
|||
onready var animation_player = $AnimationPlayer |
|||
onready var collision_shape = $CollisionShape |
|||
|
|||
func _physics_process(delta): |
|||
if hit: |
|||
return |
|||
time_alive -= delta |
|||
if time_alive < 0: |
|||
hit = true |
|||
animation_player.play("explode") |
|||
var col = move_and_collide(-delta * BULLET_VELOCITY * transform.basis.z) |
|||
if col: |
|||
if col.collider and col.collider.has_method("hit"): |
|||
col.collider.hit(col) |
|||
collision_shape.disabled = true |
|||
animation_player.play("explode") |
|||
hit = true |
@ -0,0 +1,405 @@ |
|||
[gd_scene load_steps=38 format=2] |
|||
|
|||
[ext_resource path="res://player/bullet/bullet.gd" type="Script" id=1] |
|||
[ext_resource path="res://effects_shared/bullet/BlastMesh_Sphere.mesh" type="ArrayMesh" id=2] |
|||
[ext_resource path="res://player/bullet/bullet_explode.wav" type="AudioStream" id=3] |
|||
[ext_resource path="res://effects_shared/bullet/effect/BlastMaterial.tres" type="Material" id=4] |
|||
[ext_resource path="res://effects_shared/bullet/effect/light_rays_material.tres" type="Material" id=5] |
|||
[ext_resource path="res://effects_shared/bullet/effect/LightParticle.tres" type="Material" id=6] |
|||
[ext_resource path="res://effects_shared/bullet/effect/SmokeParticles.tres" type="Material" id=7] |
|||
[ext_resource path="res://effects_shared/bullet/effect/SmokeOverrideMaterial.tres" type="Material" id=8] |
|||
[ext_resource path="res://player/bullet/bullet_material.tres" type="Material" id=9] |
|||
[ext_resource path="res://effects_shared/bullet/effect/MainBodyParticle.tres" type="Material" id=10] |
|||
[ext_resource path="res://effects_shared/bullet/effect/InnerBlastLightParticle.tres" type="Material" id=11] |
|||
[ext_resource path="res://effects_shared/bullet/effect/BlastSparksParticles.tres" type="Material" id=12] |
|||
[ext_resource path="res://effects_shared/bullet/effect/TrailParticle.tres" type="Material" id=13] |
|||
|
|||
[sub_resource type="SphereMesh" id=1] |
|||
radial_segments = 9 |
|||
rings = 5 |
|||
|
|||
[sub_resource type="SphereShape" id=2] |
|||
radius = 0.170413 |
|||
|
|||
[sub_resource type="Animation" id=3] |
|||
resource_name = "explode" |
|||
length = 3.0 |
|||
step = 0.05 |
|||
tracks/0/type = "value" |
|||
tracks/0/path = NodePath("OmniLight:light_energy") |
|||
tracks/0/interp = 1 |
|||
tracks/0/loop_wrap = true |
|||
tracks/0/imported = false |
|||
tracks/0/enabled = true |
|||
tracks/0/keys = { |
|||
"times": PoolRealArray( 0, 0.25, 0.85 ), |
|||
"transitions": PoolRealArray( 1, 1, 1 ), |
|||
"update": 0, |
|||
"values": [ 1.5, 3.0, 0.0 ] |
|||
} |
|||
tracks/1/type = "method" |
|||
tracks/1/path = NodePath(".") |
|||
tracks/1/interp = 1 |
|||
tracks/1/loop_wrap = true |
|||
tracks/1/imported = false |
|||
tracks/1/enabled = true |
|||
tracks/1/keys = { |
|||
"times": PoolRealArray( 1.5 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"values": [ { |
|||
"args": [ ], |
|||
"method": "queue_free" |
|||
} ] |
|||
} |
|||
tracks/2/type = "value" |
|||
tracks/2/path = NodePath("BulletBody/MainBody:emitting") |
|||
tracks/2/interp = 1 |
|||
tracks/2/loop_wrap = true |
|||
tracks/2/imported = false |
|||
tracks/2/enabled = true |
|||
tracks/2/keys = { |
|||
"times": PoolRealArray( 0 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ false ] |
|||
} |
|||
tracks/3/type = "value" |
|||
tracks/3/path = NodePath("MeshInstance:visible") |
|||
tracks/3/interp = 1 |
|||
tracks/3/loop_wrap = true |
|||
tracks/3/imported = false |
|||
tracks/3/enabled = true |
|||
tracks/3/keys = { |
|||
"times": PoolRealArray( 0 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ false ] |
|||
} |
|||
tracks/4/type = "value" |
|||
tracks/4/path = NodePath("ExplosionAudio:playing") |
|||
tracks/4/interp = 1 |
|||
tracks/4/loop_wrap = true |
|||
tracks/4/imported = false |
|||
tracks/4/enabled = true |
|||
tracks/4/keys = { |
|||
"times": PoolRealArray( 0.1 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ true ] |
|||
} |
|||
tracks/5/type = "value" |
|||
tracks/5/path = NodePath("Blast/BlastParticle:emitting") |
|||
tracks/5/interp = 1 |
|||
tracks/5/loop_wrap = false |
|||
tracks/5/imported = false |
|||
tracks/5/enabled = true |
|||
tracks/5/keys = { |
|||
"times": PoolRealArray( 0 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ true ] |
|||
} |
|||
tracks/6/type = "value" |
|||
tracks/6/path = NodePath("Blast/LightBlast:emitting") |
|||
tracks/6/interp = 1 |
|||
tracks/6/loop_wrap = false |
|||
tracks/6/imported = false |
|||
tracks/6/enabled = true |
|||
tracks/6/keys = { |
|||
"times": PoolRealArray( 0 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ true ] |
|||
} |
|||
tracks/7/type = "value" |
|||
tracks/7/path = NodePath("Blast/BlastSparks:emitting") |
|||
tracks/7/interp = 1 |
|||
tracks/7/loop_wrap = true |
|||
tracks/7/imported = false |
|||
tracks/7/enabled = true |
|||
tracks/7/keys = { |
|||
"times": PoolRealArray( 0 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ true ] |
|||
} |
|||
tracks/8/type = "value" |
|||
tracks/8/path = NodePath("Blast/Smoke:emitting") |
|||
tracks/8/interp = 1 |
|||
tracks/8/loop_wrap = true |
|||
tracks/8/imported = false |
|||
tracks/8/enabled = true |
|||
tracks/8/keys = { |
|||
"times": PoolRealArray( 0.2 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ true ] |
|||
} |
|||
tracks/9/type = "value" |
|||
tracks/9/path = NodePath("Blast/LightParticle:emitting") |
|||
tracks/9/interp = 1 |
|||
tracks/9/loop_wrap = true |
|||
tracks/9/imported = false |
|||
tracks/9/enabled = true |
|||
tracks/9/keys = { |
|||
"times": PoolRealArray( 0.05 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ true ] |
|||
} |
|||
tracks/10/type = "value" |
|||
tracks/10/path = NodePath("Blast/InnerBlastLight:emitting") |
|||
tracks/10/interp = 1 |
|||
tracks/10/loop_wrap = true |
|||
tracks/10/imported = false |
|||
tracks/10/enabled = true |
|||
tracks/10/keys = { |
|||
"times": PoolRealArray( 0 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ true ] |
|||
} |
|||
tracks/11/type = "value" |
|||
tracks/11/path = NodePath("BulletBody/Trail:emitting") |
|||
tracks/11/interp = 1 |
|||
tracks/11/loop_wrap = true |
|||
tracks/11/imported = false |
|||
tracks/11/enabled = true |
|||
tracks/11/keys = { |
|||
"times": PoolRealArray( 0 ), |
|||
"transitions": PoolRealArray( 1 ), |
|||
"update": 1, |
|||
"values": [ false ] |
|||
} |
|||
|
|||
[sub_resource type="Gradient" id=4] |
|||
offsets = PoolRealArray( 0, 0.318519, 1 ) |
|||
colors = PoolColorArray( 0.828125, 1, 1, 1, 0, 1, 1, 1, 0, 0.0829163, 0.964844, 0 ) |
|||
|
|||
[sub_resource type="GradientTexture" id=5] |
|||
gradient = SubResource( 4 ) |
|||
width = 128 |
|||
|
|||
[sub_resource type="Curve" id=6] |
|||
_data = [ Vector2( 0, 0 ), 0.0, 3.2107, 0, 0, Vector2( 0.575949, 1 ), 1.59619e-07, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=7] |
|||
width = 128 |
|||
curve = SubResource( 6 ) |
|||
|
|||
[sub_resource type="ParticlesMaterial" id=8] |
|||
spread = 0.0 |
|||
gravity = Vector3( 0, 0, 0 ) |
|||
scale = 0.7 |
|||
scale_curve = SubResource( 7 ) |
|||
color_ramp = SubResource( 5 ) |
|||
|
|||
[sub_resource type="Gradient" id=9] |
|||
offsets = PoolRealArray( 0, 0.703704 ) |
|||
colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 ) |
|||
|
|||
[sub_resource type="GradientTexture" id=10] |
|||
gradient = SubResource( 9 ) |
|||
width = 128 |
|||
|
|||
[sub_resource type="Curve" id=11] |
|||
_data = [ Vector2( 0, 0.236364 ), 0.0, 0.0, 0, 0, Vector2( 0.259494, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.763636 ), 0.0, 0.0, 0, 0 ] |
|||
|
|||
[sub_resource type="CurveTexture" id=12] |
|||
width = 128 |
|||
curve = SubResource( 11 ) |
|||
|
|||