door (20)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user