tiled

CreateWindowEx和CreateWindow的区别

邮差的信 提交于 2020-08-10 10:09:02
CreateWindowEx 函数功能: 该函数创建一个具有扩展风格的重叠式窗口、弹出式窗口或子窗口,其他与 CreateWindow函数相同。 关于创建窗口和其他参数的内容,请参看CreateWindowEx。 函数原型:HWND CreateWindowEx(DWORD dwExStle,LPCTSTR IpClassName,LPCTSTR lpWindowName,DWORD dwStyle,int x,int y,int nWidth,int nHeight,HWND hWndParent,HMENUhMenu,HANDLE hlnstance,LPVOIDlpParam); 参数: dwExStyle:指定窗口的扩展风格。该参数可以是下列值: WS_EX_ACCEPTFILES:指定以该风格创建的窗口接受一个拖拽文件。 WS_EX_APPWINDOW:当窗口可见时,将一个顶层窗口放置到任务条上。 WS_EX_CLIENTEDGE:指定窗口有一个带阴影的边界。 WS_EX_CONTEXTHELP:在窗口的标题条包含一个问号标志。当用户点击了问号时,鼠标光标变为一个问号的指针、如果点击了一个子窗口,则子窗日接收到WM_HELP消息。子窗口应该将这个消息传递给父窗口过程,父窗口再通过HELP_WM_HELP命令调用WinHelp函数

在百度地图加载wms图层

你说的曾经没有我的故事 提交于 2020-05-05 08:03:27
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=ZqsKQeiiEjGLpZvtTsbEYAPzmgoD4v5F"></script> <title>自定义网格</title> <style type="text/css"> body, html { width: 100%; height: 100%; margin: 0; font-family: "微软雅黑"; } #allmap { width: 100%; height: 100%; } #r-result { width: 100%; margin-top: 5px; } p { margin: 5px; font-size: 14px; } </style> </head> <body> <div id="allmap"></div> <div id="r-result">

UGUI源码分析:Image与RawImage的区别

被刻印的时光 ゝ 提交于 2020-05-04 18:56:29
系列 UGUI源码分析系列总览 相关前置: UGUI EventSystem源码分析 Graphic源码分析 UGUI MaskableGraphic源码分析,RectMask2D与Mask的原理 文章目录 系列 RawImage Image Mesh Material Raycast RawImage BaseClass: MaskableGraphic Interface: None Intro: 顾名思义,Raw,未加工的图片。 谈及RawImage,便会想到Image。两者都是继承自MaskableGraphic,但RawImage的实现相比较于Image(1200+行)简单了非常多。 RawImage 仅仅只重写了 Graphic 中的 OnPopulateMesh (详情见Graphic源码分析),提供了一个 Rect变量 来使用户可以 自定义UV的坐标 。 protected override void OnPopulateMesh(VertexHelper vh) { Texture tex = mainTexture; vh.Clear(); if (tex != null) { var r = GetPixelAdjustedRect(); var v = new Vector4(r.x, r.y, r.x + r.width, r.y + r.height);

Unity 简记(1)--TileMap

血红的双手。 提交于 2020-04-23 11:14:19
Tilemap是unity中自带的快速构建2D场景的工具,优点是省时省力, 1 使用方法 在场景创建一个Tilemap 打开TilePalette ​ 3.创建一个新的Palette,将地图切割好拉进去,点一下要画的格子,再点一下笔,就可以开始画了 2. 要点 1.若画的图片小于方格 则可在Grid的cell size处更改方格大小 若还存在缝隙问题可见下面分享博文 2.绑定碰撞体,给Grid的Tilemap添加Tilemap collider2D和rigidbody 2D组件,然后为了让地面不受重力掉下去或者被它上表面的物体压下去,将rigidbody 2D设为静态(static)刚体 3.直接Tilemap collider2D组件是每个方格加上碰撞体,其实可进行优化,再为其添加Composite Collider2D组件,再去Tilemap Collider2D那勾选上Used By Composite就可以自动优化成复合体碰撞体 ​ 分享博文: Unity中使用Tilemap快速创建2D游戏世界: https://www.jianshu.com/p/d8fe795bf6c7 彻底解决 Unity 中 Tilemap 缝隙问题: http://liaoyulei.cn/2017/05/08/fix-unity-tilemap-gap/ Unity 生成随机房间、洞穴(2D

libgdx TiledMap Rendering Performance Issue

你说的曾经没有我的故事 提交于 2019-12-25 16:52:08
问题 So I had performance issues with my libgdx project and I tracked it down to the map rendering. I isolated the issue by creating an empty project and do as little as possible, just the map rendering. This is the code I came up with: The Desktop start up project class: package com.me.test; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; public class Main { public static void main(String[] args) {

Error when Building Project: Error building Player because scripts have compile errors in the editor

≡放荡痞女 提交于 2019-12-12 12:03:59
问题 I have the Tiled2Unity plugin. When I begin to build a version of my game in Unity, be it standalone version or anything else,i get the following error, "Error building Player because scripts have compile errors in the editor" Then it points me to this class using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEditor; namespace Tiled2Unity { public class CircleObject : TmxObject { } } Can someone please help me figure out what is the problem? 回答1:

XMXtiledmap getLayer() return null with tmx file in cocos2dx

南笙酒味 提交于 2019-12-12 04:04:20
问题 I am using tiled map editor to get a tmx file and loaded that into my game which is developed with cocos2d-x c++ version 3.15.1 Here is the tmx file: <?xml version="1.0" encoding="UTF-8"?> <map version="1.0" tiledversion="1.0.2" orientation="orthogonal" renderorder="right-down" width="7" height="7" tilewidth="100" tileheight="100" nextobjectid="1"> <tileset firstgid="1" source="map.tsx"/> <layer name="gamemap" width="7" height="7"> <data encoding="csv"> 2,2,1,2,2,2,1, 2,2,2,2,2,1,1, 1,1,1,1,2

LibGDX File not found

无人久伴 提交于 2019-12-12 02:45:49
问题 Im trying to load a tiled map in libGDX with tileMap = new TmxMapLoader().load("maps/level1.tmx"); but somehow it returns a File not found exception: Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: maps\level1.tmx (Internal) at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:136) at com.badlogic.gdx.files.FileHandle.reader(FileHandle.java:164) at com.badlogic.gdx.utils.XmlReader.parse(XmlReader.java:81) ... 9 more I already tried to change the path to "/maps

how to get a perspecitve look to an orthogonal tilemap

做~自己de王妃 提交于 2019-12-11 09:43:24
问题 I am currentliy using an orthogonal map, not an isometric. But I would like to get an perspective look. the first picuture shows, what I currently have, the second shows my goal. Isn't it possible to do it with a transform matrix somehow? I did only manage to scale the whole image.. 回答1: You can use MapRenderer.setView(...) to achieve that. Create a PerspectiveCamera and set it up to have the perspective that you've shown in your second picture. Note that the tiled map will be rendered to the

Tiled Map Editor: size of isometric tile side

我的未来我决定 提交于 2019-12-09 19:58:20
问题 In Tiled editor there is an isometric map example: "isometric_grass_and_water.tmx". This example shows simple isometric map with tiles which have size 64x32 pixels. I need to know size of the side of a tile, so I simply used Pythagorean theorem for this: In right-angled triangle ABC side AC = width / 2 = 32 and side AB = height / 2 = 16. Thus side of a tile (BC) can be calculated as: So whole tile is a rhombus in which each side = 35.777. However when I add an square object with dimensions 35