示例#1
0
    void UpdateSelf()
    {
        Vector3 selfPos = selfGo.transform.position -
                          new Vector3(mapData.GetMapOffsetX(),
                                      ms.mapDepthDimession == eMapDepthDimession.DepthY ? mapData.GetMapOffsetY() : 0,
                                      ms.mapDepthDimession == eMapDepthDimession.DepthY ? 0 : mapData.GetMapOffsetY());

        if (mapType == eMapType.selfCenterMap)
        {
            selfPos.Set(-selfPos.x * widthDelta, -selfPos.GetDepth(ms.mapDepthDimession) * heightDelta, 0);
            mapTexTrans.localPosition = selfPos;
        }
        else if (mapType == eMapType.staticMap)
        {
            selfPos.Set(selfPos.x * widthDelta, selfPos.GetDepth(ms.mapDepthDimession) * heightDelta, 0);
            selfMark.localPosition = selfPos;
        }
    }