四方向A星寻路

步骤解释可参考http://blog.csdn.net/agroupofruffian/article/details/77700338,本示例即按照该步骤而来;
主场景皮肤:
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="aStarWin" width="800" height="600" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
	<e:Rect width="800" height="600"/>
	<e:Rect width="600" height="600" horizontalCenter="0" verticalCenter="0" fillColor="0x53ea09"/>
	<e:ToggleButton id="btnSetTag" label="设置障碍" x="700" y="0"/>
	<e:ToggleButton id="btnStartPos" label="设置起点" x="700" y="60"/>
	<e:ToggleButton id="btnSetEndPos" label="设置终点" x="700" y="120"/>
	<e:ToggleButton id="btnFindWay" label="开始寻路" x="700" y="180"/>
	<e:ToggleButton id="btnReset" label="重置" x="700" y="240"/>
	<e:Group id="blockGroup" width="600" height="600" horizontalCenter="0" verticalCenter="0">
		<e:layout>
			<e:TileLayout requestedRowCount="10" requestedColumnCount="10" horizontalGap="0" verticalGap="0"/>
		</e:layout>
	</e:Group>
</e:Skin>
-------------------------------分割线-------------------------------
单块皮肤
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="block" width="60" height="60" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
	<e:Rect id="rectBG" width="50" height="50" x="5" y="5" fillColor="0x096BE8"/>
	<e:Label id="lbX" text="Label" size="15" horizontalCenter="0.5" verticalCenter="-16.5" touchEnabled="false"/>
	<e:Label id="lbY" text="Label" size="15" horizontalCenter="0.5" verticalCenter="3.5" touchEnabled="false"/>
	<e:Label id="lbCode" text="Label" y="41" size="15" horizontalCenter="0"/>
</e:Skin>

-------------------------------分割线-------------------------------
块类

module ui {
    ex
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值