上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页

2013年6月25日

摘要: 1. 如果要定义一个页面能自动滚动,肯定要定义其滚动时间 var float ScrollPixelPerSec; 如果还要让玩家省去漫长的等待还得能打断bool bAllowInterrupt;这俩变量在哪里可以产生作用呢? 每一行列表使用的是ListItem实现的。 如果是最后一行该怎么找? 最后一行是:Items.Length-1,如果选中的一个Item是SelectedItem.Index2.渲染 RenderItem(Canvas canvas,float RenderDelta) 在里面给CalculateSelectedItem(SelectedItem,Delta... 阅读全文

posted @ 2013-06-25 14:20 neocsl 阅读(293) 评论(0) 推荐(0) 编辑

2013年6月24日

摘要: 初始化 function InitMenuObject(MobilePlayerInput PlayerInput,MobileMenuScene Scene,int ScreenWidth,int ScreenHeight) 初始化内部内容, local AntInventoryListItem ListItem; //道具ListItem local AntInventoryListGold ListGold; //列表金币 local AntInventoryItem Item; //对应的道具 local PlayerItemData ItemData; //对应的金币... 阅读全文

posted @ 2013-06-24 14:48 neocsl 阅读(292) 评论(0) 推荐(0) 编辑

摘要: 新建一种MenuList,这种MenuList可以动态的过滤加载自己需要的ListItem类别。这要用到排序算法进行剥离。 我们设置当前的List过滤标志位: var string CurrentListString; var int LastSelectedIndex; 定义一种enum类型来过滤自己需要的列表类型, enum InventoryFilterType{ IFT_Selected, IFT_ShowAll, //这种列表最酷的地方在于本身能显示所有你的列表类 IFT_ShowCanBuy, //这是一个解锁练习的好地方 IFT_ShowEquipped,}... 阅读全文

posted @ 2013-06-24 14:28 neocsl 阅读(272) 评论(0) 推荐(0) 编辑

2013年6月20日

摘要: MobileMenuImage extends MobileMenuObjectvar Texture2D Image;有一个enum结构将图像按需要的方式平铺enum MenuImageDrawStyle{ IDS_Normal, IDS_Stretched, IDS_Tile,};var MenuImageDrawStyle ImageDrawStyle;var UVCoords ImageUVs;var LinearColor ImageColor; 阅读全文

posted @ 2013-06-20 10:09 neocsl 阅读(154) 评论(0) 推荐(0) 编辑

2013年6月14日

摘要: 移动菜单页面管理是通过PlayerInput进行的。1.处理打开关闭页面 任何时候都可以打开多个页面,都存放在一个栈中(数组)。最后一个打开的在最顶,输入事件自顶向下,页面渲染是自底向上渲染。 OpenMenuScene(MobileMenuScene,optional mode) OpenMobileMenu(string 前面讲过的页面字符串) OpenMobileMenuMode(字符串名打开,Mode) 上面的两个Mode传入到Opened(string Mode) //可以自定义用法,以什么形式打开,做什么动作。 例如你想定以页面动画,左切还是右切都可以自己定义。2.... 阅读全文

posted @ 2013-06-14 10:52 neocsl 阅读(248) 评论(0) 推荐(0) 编辑

2013年6月13日

摘要: MobileMenuScene是显示MobileUI的交互页面。罗列一下该类中的内容 1.MobileMenuScene中有MenuName这种String类,相当于ID 2.其次MobileMenuScene中最重要的是 var array<MobileMenuObject> MenuObjects; 3.var font SceneCaptionFont; 是字体 4.还有不接受输入的 var bool bSceDoesNotRequireInput; 位置信息 float left,top,width,height; 初始 float InitialLeft; ... 阅读全文

posted @ 2013-06-13 17:43 neocsl 阅读(191) 评论(0) 推荐(0) 编辑

摘要: 玩家菜单列表,玩家菜单列表详细的列出玩家身上所携带的武器枪支。填充Item var TextureUVs IconUV; MobileMenuListItem分析: 1.传统的MobileMenuListItem有一个Init初始化函数,该函数用来让其参数将自己添加进列表中,List.AddItem(self); function Init(MobileMenuList List,TextureUVs Icon) //第一个参数获取MobileMenuList,第二个获取UVs 2.对齐其高度和宽度以及位置 IconUV=Icon; //这样以后方便调用 Height=Lis... 阅读全文

posted @ 2013-06-13 12:30 neocsl 阅读(154) 评论(0) 推荐(0) 编辑

2013年6月9日

摘要: Begin Object class="MobileMenuButton" Name=CloseButtonTag="Play"bRelativeLeft=truebRelativeTop=truebRelativeHeight=truebRelativeWidth=truebHeightRelativeToWidth=trueLeft=0.04Top=0Width=0.25 Height=1.0Caption="Play!"bCaptionShadow=trueImages(0)=Texture2D'ChickenHUD.H 阅读全文

posted @ 2013-06-09 12:26 neocsl 阅读(166) 评论(0) 推荐(0) 编辑

摘要: MobileMenuBase可以有效的实现渐变效果,并且给自己的iPad页面架上黑条。 var Texture2D iPadBackgroundTexture; var MobileMenuObject.UVCoords iPadBackgroundCoords;2.这是实现渐变效果的相关 var float fadetime和fadeDuration; //前者是现在的时间,Duration是自定义淡出多快 var bool bFadeOut; //是淡入还是淡出 bCloseOnFadeOut //见名知意 function Fade(bool bIsFadeOut,flo... 阅读全文

posted @ 2013-06-09 12:06 neocsl 阅读(162) 评论(0) 推荐(0) 编辑

2013年6月8日

摘要: 在MobileMenuElement中有var vector2D VpPos,VpSize; 分别是列表的位置和大小。然后在MobileMenuListItem中有Height和Width。分别表示每一个item的长度和宽度。 在MobileMenuListItem中可以填充这些元素。 我自己定义了一种文字var array<AntDrawText> Parts; AntDrawText是自定义的文字类,里面的Render(Canvas,Alpha);//是文字的渲染函数 function RenderItem(MobileMenuList List,Canvas canvas,f 阅读全文

posted @ 2013-06-08 17:24 neocsl 阅读(172) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页