示例#1
0
        protected override void Awake()
        {
            base.Awake();

            m_TilemapBG         = transform.Find("Tilemap_BG").GetComponent <TilemapBG>();
            m_TilemapObstacle   = transform.Find("Tilemap_Obstacle").GetComponent <TilemapObstacle>();
            m_TilemapGrid       = transform.Find("Tilemap_Grid").GetComponent <TilemapGrid>();
            m_TilemapHighlight  = transform.Find("Tilemap_Highlight").GetComponent <TilemapHighlight>();
            m_TilemapPathFind   = m_TilemapHighlight.transform.GetComponent <TilemapPathFind>();
            m_TilemapController = m_TilemapHighlight.transform.GetComponent <TilemapController>();
            m_TilemapInput      = m_TilemapHighlight.transform.GetComponent <TilemapInput>();
        }
        protected override void Awake()
        {
            base.Awake();

            m_TilemapHighlight  = this.GetComponent <TilemapHighlight>();
            m_TilemapController = this.GetComponent <TilemapController>();
            m_TilemapInput      = this.GetComponent <TilemapInput>();

            m_Tilemap = GetComponent <Tilemap>();

            m_Bounds = m_Tilemap.cellBounds;

            m_Direction[(int)eDirection.North] = Vector3Int.up;
            m_Direction[(int)eDirection.South] = Vector3Int.down;
            m_Direction[(int)eDirection.West]  = Vector3Int.left;
            m_Direction[(int)eDirection.East]  = Vector3Int.right;
        }