Fireball (initial implementation)
This commit is contained in:
BIN
Materials/Textures/J8PL2ps.png
Normal file
BIN
Materials/Textures/J8PL2ps.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
35
Materials/Textures/J8PL2ps.png.import
Normal file
35
Materials/Textures/J8PL2ps.png.import
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c34rmmok27h34"
|
||||||
|
path.s3tc="res://.godot/imported/J8PL2ps.png-751b864ede67a2ca520cb2b1ab837bad.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Materials/Textures/J8PL2ps.png"
|
||||||
|
dest_files=["res://.godot/imported/J8PL2ps.png-751b864ede67a2ca520cb2b1ab837bad.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=0
|
||||||
BIN
Materials/Textures/VXgkg8o.png
Normal file
BIN
Materials/Textures/VXgkg8o.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
34
Materials/Textures/VXgkg8o.png.import
Normal file
34
Materials/Textures/VXgkg8o.png.import
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cvl26l4rivnu2"
|
||||||
|
path="res://.godot/imported/VXgkg8o.png-e46a5ae5271a294a3778ff76bae485c3.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Materials/Textures/VXgkg8o.png"
|
||||||
|
dest_files=["res://.godot/imported/VXgkg8o.png-e46a5ae5271a294a3778ff76bae485c3.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
Materials/Textures/caaf021ecac0f417e167b9184d45ae8e.png
Normal file
BIN
Materials/Textures/caaf021ecac0f417e167b9184d45ae8e.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 421 KiB |
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bwku8f676eq6j"
|
||||||
|
path.s3tc="res://.godot/imported/caaf021ecac0f417e167b9184d45ae8e.png-dd3b176e697b353ec263ddcf09cc450b.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Materials/Textures/caaf021ecac0f417e167b9184d45ae8e.png"
|
||||||
|
dest_files=["res://.godot/imported/caaf021ecac0f417e167b9184d45ae8e.png-dd3b176e697b353ec263ddcf09cc450b.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=0
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
[gd_scene load_steps=13 format=3 uid="uid://bcsgd8vxy43g2"]
|
[gd_scene load_steps=16 format=3 uid="uid://bcsgd8vxy43g2"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Scripts/Player.cs" id="1_8dc05"]
|
[ext_resource type="Script" path="res://Scripts/Player.cs" id="1_8dc05"]
|
||||||
[ext_resource type="PackedScene" uid="uid://d20uxkpid4ynd" path="res://Models/vivi1.gltf" id="1_mqt2m"]
|
[ext_resource type="PackedScene" uid="uid://d20uxkpid4ynd" path="res://Models/vivi1.gltf" id="1_mqt2m"]
|
||||||
[ext_resource type="Script" path="res://Scripts/CameraSystem.cs" id="3_5ecw2"]
|
[ext_resource type="Script" path="res://Scripts/CameraSystem.cs" id="3_5ecw2"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c13g5orvyhy1p" path="res://Models/moogle.gltf" id="4_dckjs"]
|
[ext_resource type="PackedScene" uid="uid://c13g5orvyhy1p" path="res://Models/moogle.gltf" id="4_dckjs"]
|
||||||
[ext_resource type="Script" path="res://Scripts/NPCFollow.cs" id="4_o5mpp"]
|
[ext_resource type="Script" path="res://Scripts/NPCFollow.cs" id="4_o5mpp"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bwku8f676eq6j" path="res://Materials/Textures/caaf021ecac0f417e167b9184d45ae8e.png" id="6_7wayf"]
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Fireball.cs" id="7_mkgs3"]
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_8verc"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_8verc"]
|
||||||
size = Vector3(100, 2, 100)
|
size = Vector3(100, 2, 100)
|
||||||
@@ -29,6 +31,17 @@ albedo_color = Color(0.509804, 0.584314, 1, 1)
|
|||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ultw4"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ultw4"]
|
||||||
albedo_color = Color(1, 1, 0, 1)
|
albedo_color = Color(1, 1, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_njysa"]
|
||||||
|
cull_mode = 1
|
||||||
|
shading_mode = 0
|
||||||
|
specular_mode = 1
|
||||||
|
vertex_color_use_as_albedo = true
|
||||||
|
albedo_texture = ExtResource("6_7wayf")
|
||||||
|
billboard_mode = 3
|
||||||
|
particles_anim_h_frames = 1
|
||||||
|
particles_anim_v_frames = 1
|
||||||
|
particles_anim_loop = false
|
||||||
|
|
||||||
[node name="Main" type="Node"]
|
[node name="Main" type="Node"]
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
||||||
@@ -38,6 +51,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.06471, 0)
|
|||||||
shape = SubResource("BoxShape3D_8verc")
|
shape = SubResource("BoxShape3D_8verc")
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D"]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0055759, 0.075381, -0.0165453)
|
||||||
mesh = SubResource("BoxMesh_0jrjy")
|
mesh = SubResource("BoxMesh_0jrjy")
|
||||||
|
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||||
@@ -105,3 +119,13 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.54678, 0.383205, 4.07192)
|
|||||||
material_override = SubResource("StandardMaterial3D_ultw4")
|
material_override = SubResource("StandardMaterial3D_ultw4")
|
||||||
use_collision = true
|
use_collision = true
|
||||||
size = Vector3(15.0266, 4.74018, 1)
|
size = Vector3(15.0266, 4.74018, 1)
|
||||||
|
|
||||||
|
[node name="Particles" type="Node3D" parent="."]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="Fireball" type="CSGSphere3D" parent="Particles"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.07254, -1.49094)
|
||||||
|
radial_segments = 5
|
||||||
|
rings = 20
|
||||||
|
material = SubResource("StandardMaterial3D_njysa")
|
||||||
|
script = ExtResource("7_mkgs3")
|
||||||
|
|||||||
10
Scripts/Fireball.cs
Normal file
10
Scripts/Fireball.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
|
public partial class Fireball : CsgSphere3D
|
||||||
|
{
|
||||||
|
private float _speed = 80f;
|
||||||
|
|
||||||
|
public override void _PhysicsProcess(double delta)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,6 +30,12 @@ public partial class Player : CharacterBody3D
|
|||||||
{
|
{
|
||||||
if (Input.IsActionJustPressed("quit"))
|
if (Input.IsActionJustPressed("quit"))
|
||||||
GetTree().Quit();
|
GetTree().Quit();
|
||||||
|
if (Input.IsActionJustPressed("shoot"))
|
||||||
|
Shoot();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _Input(InputEvent @event)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _PhysicsProcess(double delta)
|
public override void _PhysicsProcess(double delta)
|
||||||
@@ -41,6 +47,14 @@ public partial class Player : CharacterBody3D
|
|||||||
MoveAndSlide();
|
MoveAndSlide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Shoot()
|
||||||
|
{
|
||||||
|
GD.Print("Shoot");
|
||||||
|
var projectile = new Fireball();
|
||||||
|
Owner.AddChild(projectile);
|
||||||
|
projectile.Transform = Transform;
|
||||||
|
}
|
||||||
|
|
||||||
private Vector3 CalculateMovement(Vector3 velocity, Transform3D transform, float gravityDelta)
|
private Vector3 CalculateMovement(Vector3 velocity, Transform3D transform, float gravityDelta)
|
||||||
{
|
{
|
||||||
if (!IsOnFloor())
|
if (!IsOnFloor())
|
||||||
|
|||||||
@@ -72,3 +72,9 @@ joyrightY={
|
|||||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
|
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
shoot={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":122,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user