public void UpdateSprList()
    {
        if (mapProxy == null)
        {
            mapProxy = GameFacade.GetProxy <MapProxy>();
        }
        List <int> sprs = mapProxy.GetSprLists(xIdx, yIdx);

        mHexBg.spriteIds.Clear();
        mHexBg.spriteIds.AddRange(sprs);

        mHexWater.spriteIds.Clear();
        mHexWater.spriteIds.AddRange(sprs);
    }
Beispiel #2
0
    void Update()
    {
        if (Input.GetMouseButtonUp(0))
        {
            if (mIsClickEditArea)
            {
                mIsClickEditArea = false;
            }
            else
            {
                mCurLeftClicked = MapView.Current.Layout.ScreenPos2Coord(MapView.Current.MapCamera, Input.mousePosition.xy());
                coord.text      = mCurLeftClicked.ToString();
                List <int> sprs = mapProxy.GetSprLists(mCurLeftClicked.GetSubmapCoord());
                for (int i = 0; i < sprs.Count; i++)
                {
                    sprLists[i].value = sprs[i];
                }
            }
        }

        if (Input.GetMouseButtonUp(1))
        {
            Coord newdst = MapView.Current.Layout.ScreenPos2Coord(MapView.Current.MapCamera, Input.mousePosition.xy());
            mDst = newdst;
            OnMRBAction_Common();
        }
        else if (Input.GetMouseButton(1))
        {
            Coord newdst = MapView.Current.Layout.ScreenPos2Coord(MapView.Current.MapCamera, Input.mousePosition.xy());
            if (newdst != mDst)
            {
                mDst = newdst;
                OnMRBAction_Common();
            }
        }
    }