godot-chess/Project/addons/Chess/Scripts/King.gd

17 lines
388 B
GDScript3
Raw Normal View History

2024-04-14 21:35:09 -07:00
@tool
extends Pawn
class_name King
var Castling = true
func _ready():
self.texture = load("res://addons/Chess/Textures/WKing.svg")
func _process(_delta):
if Item_Color != Temp_Color:
Temp_Color = Item_Color
if Item_Color == 0:
self.texture = load("res://addons/Chess/Textures/WKing.svg")
elif Item_Color == 1:
self.texture = load("res://addons/Chess/Textures/BKing.svg")