摘要: MeshFilter决定了物体时什么形状 MeshRender决定了物体时的外观; 运行时常量:readonly 1.readonly string NAME_READONLY = "readonly string"; 2.//正确,可定义任意数据类型 readonly Program PROGRA 阅读全文
posted @ 2017-07-05 11:59 无畏先锋 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 热更新的方式(经常用于更新UI) :1.动态库(dll文件)2.Ulua (常用的)3.c#Light OnClick挂在的脚本 在热更新时无法更改;所以要将通用的点击事件封装起来 ,以后不再改变;每个面板都会对应自己的Ulua脚本;lua需要进行打包成zip?才能在ios上使用。 2.如何用Lua 阅读全文
posted @ 2017-07-05 10:47 无畏先锋 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 using UnityEngine; using System.Collections; public class Script1 : MonoBehaviour { public float movespeed; private Vector3 PresentPosition; pr 阅读全文
posted @ 2016-10-28 20:00 无畏先锋 阅读(147) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine; using System.Collections; public class Script1 : MonoBehaviour { public float movespeed; private Vector3 PresentPosition; private V 阅读全文
posted @ 2016-10-28 19:58 无畏先锋 阅读(257) 评论(0) 推荐(0) 编辑
摘要: lua文件如下: print("ddhdhh")function login(username,pswd)if username =="ms" and pswd=="ms" thenprint('用户存在')return true;elseprint('用户不存在')return falseende 阅读全文
posted @ 2016-10-28 19:55 无畏先锋 阅读(783) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;using LuaInterface;//引入lua接口public class MyHellowWorld : MonoBehaviour { //创建lua对象 LuaState lua; //string s 阅读全文
posted @ 2016-10-28 19:30 无畏先锋 阅读(2743) 评论(0) 推荐(0) 编辑
摘要: using UnityEngine;using System.Collections;public class MicPhoneScripts : MonoBehaviour{ private AudioSource audioSource; AudioClip clip; void Awake() 阅读全文
posted @ 2016-10-28 09:45 无畏先锋 阅读(1916) 评论(0) 推荐(0) 编辑
摘要: --男人类man = {name = "man",age=123}--继承空间man.__index=man--儿童类child= {}--继承setmetatable(child,man)print(child.age)yong= {}setmetatable(yong,man)child.age 阅读全文
posted @ 2016-10-27 21:50 无畏先锋 阅读(449) 评论(0) 推荐(0) 编辑
摘要: --使用table封装面向对象beauty={name = " "}--封装对象方法function beauty.init(self, name)print("十八年前的一天王小丫出生")self.name= nameend--一般使用下面这种形式function beauty:init( nam 阅读全文
posted @ 2016-10-27 21:49 无畏先锋 阅读(311) 评论(0) 推荐(0) 编辑
摘要: function SayHey(mag) for i = 1 , 3 doprint(mag)coroutine.yield()end end --创建携程(协同) coFunc= coroutine.create(SayHey)--查看携程状态print(coroutine.status(coFu 阅读全文
posted @ 2016-10-27 21:48 无畏先锋 阅读(1052) 评论(0) 推荐(0) 编辑