Make overworld doors be of unlockable type, add behavior later
This commit is contained in:
@@ -1,27 +0,0 @@
|
|||||||
|
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
[Meta(typeof(IAutoNode))]
|
|
||||||
public partial class Door : Node3D, IDoor
|
|
||||||
{
|
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
|
||||||
|
|
||||||
[Node] public AnimationPlayer AnimationPlayer { get; set; }
|
|
||||||
|
|
||||||
public void OnReady()
|
|
||||||
{
|
|
||||||
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AnimationPlayer_AnimationFinished(StringName animName)
|
|
||||||
{
|
|
||||||
QueueFree();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Demolish()
|
|
||||||
{
|
|
||||||
AnimationPlayer.Play("explode");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
using Chickensoft.GodotNodeInterfaces;
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
|
|
||||||
public interface IDoor : INode3D
|
public interface IDoor : INode3D;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|||||||
6
Zennysoft.Game.Ma/src/map/UnlockableDoor.cs
Normal file
6
Zennysoft.Game.Ma/src/map/UnlockableDoor.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
|
public partial class UnlockableDoor : Node3D, IDoor
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
1
Zennysoft.Game.Ma/src/map/UnlockableDoor.cs.uid
Normal file
1
Zennysoft.Game.Ma/src/map/UnlockableDoor.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bxs2sugex0p0i
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using Chickensoft.AutoInject;
|
using Chickensoft.AutoInject;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Godot;
|
using Godot;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=3 uid="uid://bn5egdkg03f5d"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bxs2sugex0p0i" path="res://src/map/UnlockableDoor.cs" id="4_om2kn"]
|
||||||
|
|
||||||
|
[node name="Node3D" type="Node3D"]
|
||||||
|
script = ExtResource("4_om2kn")
|
||||||
File diff suppressed because one or more lines are too long
@@ -32,6 +32,15 @@ animation/trimming=false
|
|||||||
animation/remove_immutable_tracks=true
|
animation/remove_immutable_tracks=true
|
||||||
animation/import_rest_as_RESET=false
|
animation/import_rest_as_RESET=false
|
||||||
import_script/path=""
|
import_script/path=""
|
||||||
_subresources={}
|
_subresources={
|
||||||
|
"nodes": {
|
||||||
|
"PATH:PROS DOOR": {
|
||||||
|
"mesh_instance/layers": 0
|
||||||
|
},
|
||||||
|
"PATH:PROS DOOR 2": {
|
||||||
|
"mesh_instance/layers": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
gltf/naming_version=1
|
gltf/naming_version=1
|
||||||
gltf/embedded_image_handling=1
|
gltf/embedded_image_handling=1
|
||||||
|
|||||||
Reference in New Issue
Block a user