using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class BackgroundBlock : BlockBase { public bool InRage { get; private set; } public bool IsMovable { get; private set; } public void SetData(int x, int y) { CurrentX = x; CurrentY = y; InRage = false; IsMovable = false; } public void SetColor(E_TEAM team) { IsMovable = true; InRage = true; _backgroundImg.color = Constants.TEAM_BLOCK_COLOR[team]; } public void ResetColor() { InRage = false; IsMovable = false; _backgroundImg.color = Color.white; } public void OnSelected() { if(IsMovable) { GameManager.Instance.CharacterMove(this); } //¼±ÅûóÅÂÀÏ ¶§ À̵¿ÇÒ µ¥ÀÌÅÍ } public void UpdatePosition(Vector3 pos) { GetComponent().anchoredPosition = pos; } }