mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 03:45:55 +00:00
Directional computers
This commit is contained in:
parent
72ce9fb932
commit
7ec45b56b1
13 changed files with 164 additions and 46 deletions
|
|
@ -1,11 +1,13 @@
|
|||
using Godot;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Cirno.Scripts.Components;
|
||||
using Cirno.Scripts.Enums;
|
||||
|
||||
public partial class Chair : StaticBody2D
|
||||
public partial class Chair : StaticBody2D, IIRotateable
|
||||
{
|
||||
[Export]
|
||||
public ChairDirection Direction { get; private set; } = ChairDirection.Down;
|
||||
public Direction Direction { get; set; } = Direction.Down;
|
||||
|
||||
private AnimatedSprite2D _animatedSprite;
|
||||
|
||||
|
|
@ -20,7 +22,7 @@ public partial class Chair : StaticBody2D
|
|||
{
|
||||
_animatedSprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
|
||||
|
||||
_animatedSprite.Play(Direction.ToString());
|
||||
//_animatedSprite.Play(Direction.ToString());
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
|
|
@ -44,13 +46,5 @@ public partial class Chair : StaticBody2D
|
|||
_timer = 0;
|
||||
}
|
||||
|
||||
|
||||
public enum ChairDirection
|
||||
{
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
13
Scripts/Actors/Computer.cs
Normal file
13
Scripts/Actors/Computer.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using Cirno.Scripts.Components;
|
||||
using Cirno.Scripts.Enums;
|
||||
using Cirno.Scripts.Interactables;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Actors;
|
||||
|
||||
public partial class Computer : Switch, IIRotateable
|
||||
{
|
||||
[Export]
|
||||
public Direction Direction { get; set; } = Direction.Down;
|
||||
|
||||
}
|
||||
1
Scripts/Actors/Computer.cs.uid
Normal file
1
Scripts/Actors/Computer.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ck54glo7xbuq8
|
||||
Loading…
Add table
Add a link
Reference in a new issue