door (20)

This commit is contained in:
2024-10-20 14:52:24 +02:00
parent 704f2dfd2c
commit eb93c527d3
54 changed files with 2605 additions and 174 deletions

View File

@@ -13,24 +13,44 @@ public partial class DoorView : Control
string answerA{get; set;}
string answerB{get; set;}
bool answerA_good {get; set;}
bool shot {get; set;}= true;
bool caniche {get; set;}= false;
CharacterBody2D player;
[Export] Label text_mob;
[Export] Button butA;
[Export] Button butB;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
player = (CharacterBody2D)GetParent().GetParent();
}
public void start()
public async void start()
{
GetParent<Camera2D>().PositionSmoothingEnabled = false;
Input.MouseMode = Input.MouseModeEnum.Visible;
GetTree().Paused = true;
Visible = true;
mob.Texture = mobTex;
anim.Play("enter");
if(shot)
{
anim.Play("shot");
player.Call("OverShotgun");
}
else if (caniche)
{
anim.Play("can");
}
else
{
anim.Play("enter");
}
}
public void stop()