Пример #1
0
    // Use this for initialization
    void Start()
    {
        NameMap = this.name;
        Field   = NameMap.Replace("MapGridCell", "");
        //Field = NameMap;
        Vector2 pos = Helper.GetPositByField(Field);

        X = (int)pos.x;
        Y = (int)pos.y;

        //Debug.Log("--------------- Start Load Map Cell " + name);
        LabelCellMapGrid.text = X + "x" + Y;

        //if (X == 2 && Y == 1)
        //{
        //if ((X == 1 && Y == 1) ||
        //    (X == 2 && Y == 1) ||
        //    (X == 1 && Y == 2) ||
        //    (X == 2 && Y == 2))
        //if ((X == 1 && Y == 1) ||
        //    (X == 1 && Y == 2) ||
        //    (X == 3 && Y == 1) ||
        //    (X == 12 && Y == 1))
        //{

        //}
    }