parent
286dfb8061
commit
4dbc9cef92
2 changed files with 6 additions and 3 deletions
@ -1,9 +1,12 @@ |
|||||||
using Godot; |
using Godot; |
||||||
|
|
||||||
public class Block : StaticBody2D |
public class Block : StaticBody2D, IInitializable |
||||||
{ |
{ |
||||||
public new BlockPos Position { get => BlockPos.FromVector(base.Position); |
public new BlockPos Position { get => BlockPos.FromVector(base.Position); |
||||||
set => base.Position = value.ToVector(); } |
set => base.Position = value.ToVector(); } |
||||||
public Color Color { get => Modulate; set => Modulate = value; } |
public Color Color { get => Sprite.SelfModulate; set => Sprite.SelfModulate = value; } |
||||||
public bool Unbreakable { get; set; } = false; |
public bool Unbreakable { get; set; } = false; |
||||||
|
|
||||||
|
public Sprite Sprite { get; private set; } |
||||||
|
public void Initialize() => Sprite = GetNode<Sprite>("Sprite"); |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue