private Color GetColor(int cost) { if (m_isTarget) { return(Color.red); } else { return(Define.Cost2Color(cost)); } }
public override void Init(int x, int y, int cost) { base.Init(x, y, cost); m_renderer = GetComponent <MeshRenderer>(); m_mat = m_renderer.material; m_mat.color = Define.Cost2Color(cost); m_valueText = transform.Find("Value").GetComponent <TextMesh>(); m_valueText.gameObject.SetActive(false); InitJPSPlus(); }
public void Reset() { m_g = float.MaxValue; m_h = -1; m_parent = null; m_opened = m_closed = false; m_mat.color = Define.Cost2Color(m_cost); m_searchType = SearchType.None; m_trueClearance = 0; m_valueText.gameObject.SetActive(false); }
public override void SetCost(int cost) { base.SetCost(cost); m_mat.color = Define.Cost2Color(cost); }
public void SetCost(int cost) { m_cost = cost; GetComponent <Renderer>().material.color = Define.Cost2Color(cost); }