Initial commit
This commit is contained in:
BIN
Characters/Wizard/Body.png
Normal file
BIN
Characters/Wizard/Body.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 157 B |
40
Characters/Wizard/Body.png.import
Normal file
40
Characters/Wizard/Body.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://qi1cvcj41wxr"
|
||||
path="res://.godot/imported/Body.png-daff6fe764e3d2af10242c881fd809fa.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Characters/Wizard/Body.png"
|
||||
dest_files=["res://.godot/imported/Body.png-daff6fe764e3d2af10242c881fd809fa.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
27
Characters/Wizard/Wizard.cs
Normal file
27
Characters/Wizard/Wizard.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using Godot;
|
||||
|
||||
public partial class Wizard : CharacterBase
|
||||
{
|
||||
[Export] public PackedScene Projectile { get; set; } = default!;
|
||||
|
||||
public override string[] _GetConfigurationWarnings()
|
||||
{
|
||||
var strings = new List<string>();
|
||||
|
||||
if (!Projectile?.CanInstantiate() ?? true)
|
||||
{
|
||||
strings.Add("Projectile is not set or invalid scene.");
|
||||
}
|
||||
|
||||
return [.. strings];
|
||||
}
|
||||
|
||||
protected override void _UsePrimary()
|
||||
{
|
||||
var projectile = Projectile.Instantiate<ProjectileBase>();
|
||||
|
||||
projectile.Spawn(this);
|
||||
GetTree().CurrentScene.AddChild(projectile);
|
||||
}
|
||||
}
|
||||
1
Characters/Wizard/Wizard.cs.uid
Normal file
1
Characters/Wizard/Wizard.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cx2flf2i3h0rv
|
||||
21
Characters/Wizard/Wizard.tscn
Normal file
21
Characters/Wizard/Wizard.tscn
Normal file
@@ -0,0 +1,21 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://xcfscklhvnew"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://qi1cvcj41wxr" path="res://Characters/Wizard/Body.png" id="1_pptet"]
|
||||
[ext_resource type="Script" uid="uid://cx2flf2i3h0rv" path="res://Characters/Wizard/Wizard.cs" id="1_vgyld"]
|
||||
[ext_resource type="PackedScene" uid="uid://b2u2xirxjo68h" path="res://Abilities/Fireballv3.tscn" id="2_n5kae"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_n5kae"]
|
||||
size = Vector2(16, 32)
|
||||
|
||||
[node name="Character" type="CharacterBody2D"]
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_vgyld")
|
||||
Projectile = ExtResource("2_n5kae")
|
||||
Speed = 300.0
|
||||
PrimaryCooldown = 0.5
|
||||
|
||||
[node name="Body" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_pptet")
|
||||
|
||||
[node name="CollisionBox" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_n5kae")
|
||||
Reference in New Issue
Block a user