Пример #1
0
 public void Selected()
 {
     this.transform.Find("model").gameObject.SetActive(false);
     m_itemPre = Instantiate(itemPre_prefab);
     m_itemPre.transform.SetParent(this.transform, false);
     m_itemPre.transform.localPosition = Vector3.zero;
     m_itemPre.transform.localRotation = Quaternion.Euler(Vector3.zero);
     m_itemPre.SetState(true);
 }
Пример #2
0
    protected virtual bool CheckPlaneUpdate(Vector3Int _itemPosition)
    {
        bool avaliableFlag = item_prefab.CheckMapAvaliable(_itemPosition, m_rotation_offset);

        m_itemPre.SetState(avaliableFlag);

        m_itemPre.transform.localPosition = new Vector3(_itemPosition.x - 0.5f, _itemPosition.y, _itemPosition.z - 0.5f);
        // m_itemPre.transform.localRotation = Quaternion.Euler(0.0f, 0.0f, 0.0f);

        return(avaliableFlag);
    }