Ajout de enemy model basic af

This commit is contained in:
Victor Turgeon
2022-10-11 13:08:59 -04:00
parent c86244a5b4
commit 30dd714275
16 changed files with 1432 additions and 60 deletions

21
Scenes/Enemy.tscn Normal file
View File

@@ -0,0 +1,21 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://BlenderStuff/protoenemy.obj" type="ArrayMesh" id=1]
[sub_resource type="BoxShape" id=1]
[sub_resource type="BoxShape" id=2]
[node name="Enemy" type="KinematicBody"]
[node name="MeshInstance" type="MeshInstance" parent="."]
transform = Transform( 0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 0, 0, 0 )
mesh = ExtResource( 1 )
[node name="BodyCollision" type="CollisionShape" parent="."]
transform = Transform( 0.481304, 0, 0, 0, 0.793226, 0, 0, 0, 0.201743, 0, 0.33586, 0 )
shape = SubResource( 1 )
[node name="Head" type="CollisionShape" parent="."]
transform = Transform( 0.400588, 0, 0, 0, 0.551904, 0, 0, 0, 0.400588, 0, 1.87761, 0 )
shape = SubResource( 2 )

43
Scenes/Player.tscn Normal file
View File

@@ -0,0 +1,43 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://Player.gd" type="Script" id=1]
[ext_resource path="res://BlenderStuff/protohand.obj" type="ArrayMesh" id=2]
[ext_resource path="res://Textures/kenney_prototype_textures/purple/texture_01.png" type="Texture" id=3]
[sub_resource type="CapsuleShape" id=2]
height = 3.0
[sub_resource type="CylinderShape" id=3]
[sub_resource type="SpatialMaterial" id=4]
albedo_texture = ExtResource( 3 )
uv1_triplanar = true
[node name="Player" type="KinematicBody"]
script = ExtResource( 1 )
[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 )
shape = SubResource( 2 )
[node name="Feet" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.49873, 0 )
shape = SubResource( 3 )
[node name="Head" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.84218, 0 )
[node name="Camera" type="Camera" parent="Head"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.343071, -0.253136 )
[node name="Hand" type="MeshInstance" parent="Head"]
transform = Transform( -0.178665, 0.385633, 0.029372, 0.386578, 0.177104, 0.0262457, 0.0115471, 0.0376592, -0.4242, 1.33036, -0.0718137, -2.73514 )
cast_shadow = 0
mesh = ExtResource( 2 )
skeleton = NodePath("../..")
material/0 = SubResource( 4 )
[node name="GroundCheck" type="RayCast" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, 0 )
enabled = true
cast_to = Vector3( 0, -1.5, 0 )

71
Scenes/Test_Scene.tscn Normal file
View File

@@ -0,0 +1,71 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://Materials/Dark_ProtoMat.tres" type="Material" id=1]
[ext_resource path="res://Scenes/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://Materials/Orange_ProtoMat.tres" type="Material" id=3]
[ext_resource path="res://AllSkyFree_Skyboxes/Epic_BlueSunset_EquiRect_flat.png" type="Texture" id=4]
[ext_resource path="res://Scenes/Enemy.tscn" type="PackedScene" id=5]
[sub_resource type="PanoramaSky" id=1]
panorama = ExtResource( 4 )
[sub_resource type="Environment" id=2]
background_mode = 2
background_sky = SubResource( 1 )
ambient_light_energy = 0.67
fog_enabled = true
fog_color = Color( 0.305882, 0.372549, 0.52549, 1 )
fog_sun_color = Color( 0.901961, 0.803922, 0.752941, 1 )
fog_sun_amount = 1.0
fog_depth_begin = 98.8
fog_depth_end = 1444.5
fog_depth_curve = 0.466516
fog_transmit_enabled = true
fog_transmit_curve = 0.659754
fog_height_enabled = true
fog_height_min = 148.2
fog_height_max = -48.0
fog_height_curve = 4.59481
ssao_radius = 8.1
ssao_intensity = 4.3
ssao_radius2 = 40.7
ssao_intensity2 = 14.6
ssao_bias = 0.059
ssao_color = Color( 0.180392, 0.207843, 0.25098, 1 )
glow_enabled = true
glow_intensity = 1.86
glow_strength = 0.87
glow_bloom = 0.02
glow_hdr_threshold = 0.44
glow_bicubic_upscale = true
[node name="Spatial" type="Spatial"]
[node name="CSGCombiner" type="CSGCombiner" parent="."]
use_collision = true
[node name="CSGBox" type="CSGBox" parent="CSGCombiner"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
width = 106.0
depth = 82.0
material = ExtResource( 1 )
[node name="CSGPolygon" type="CSGPolygon" parent="CSGCombiner"]
transform = Transform( 3.51681, 0, 0, 0, 4.16599, 0, 0, 0, 14.5504, 22.4026, 0, 7 )
polygon = PoolVector2Array( 0, 0, -3, 0, 1, 1, 1, 0 )
material = ExtResource( 3 )
[node name="Player" parent="." instance=ExtResource( 2 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0 )
[node name="WorldEnvironment_EpicBlueSky" type="WorldEnvironment" parent="."]
environment = SubResource( 2 )
[node name="DirectionalLight_EpicBlueSky" type="DirectionalLight" parent="."]
transform = Transform( 1, 0, 0, 0, 0.849579, 0.527461, 0, -0.527461, 0.849579, 0, 26.5368, 0 )
light_color = Color( 1, 0.924276, 0.869018, 1 )
light_specular = 1.0
shadow_enabled = true
[node name="Enemy" parent="." instance=ExtResource( 5 )]
transform = Transform( 0.6, 0, 0, 0, 0.6, 0, 0, 0, 0.6, 1.17105, 2.7605, -13.5942 )