Подсказка по управлению фонарем
This commit is contained in:
parent
4d3ac1e4fb
commit
e8f5c3de80
6 changed files with 95 additions and 1 deletions
|
@ -12,12 +12,17 @@ public partial class Player : CharacterBody2D
|
|||
public static Player Instance { get; private set; }
|
||||
|
||||
protected AnimatedSprite2D Sprite;
|
||||
protected AnimatedSprite2D SpriteSpaceBar;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
Sprite = (AnimatedSprite2D)FindChild("AnimatedSprite2D");
|
||||
SpriteSpaceBar = (AnimatedSprite2D)FindChild("AnimatedSprite2D2");
|
||||
SpriteSpaceBar.Play("default");
|
||||
SpriteSpaceBar.Visible = false;
|
||||
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
|
@ -69,4 +74,13 @@ public partial class Player : CharacterBody2D
|
|||
|
||||
DeathScreen.Instance.Killed(killer);
|
||||
}
|
||||
|
||||
public void FlashlightHelperOn()
|
||||
{
|
||||
SpriteSpaceBar.Visible = true;
|
||||
}
|
||||
public void FlashlightHelperOff()
|
||||
{
|
||||
SpriteSpaceBar.Visible = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue