Unity - A计划(永久有效期) 扫二维码继续学习 二维码时效为半小时

(207评价)
优惠后 ¥1899.00优惠前 ¥2499.00 双十一全年最大力度限时优惠
1对1 答疑即时回复7天无理由退款30天价保提问必答

服务保障

1对1 答疑

提供专属的一对一在线答疑,快速答疑解惑。

即时回复

及时响应学习咨询,帮助解决问题。

7天无理由退款

购买后7天内可申请无理由退款。

30天价保

购买后30天内如遇降价,可申请价保。

提问必答

对于提问做到有问必答,帮您扫清学习过程中的种种障碍

要对程序集添加依赖,可以点击根程序集,在references属性下点击+,在+号里拖拽要依赖的程序集,就能调用程序集里的类

如果要在C#中编写C++代码,要在options下勾选Allow 'unsafe' Code

[展开全文]
sdewqazxcds · 2020-03-26 · 0

程序集是建了相对应的文件夹才会增加相对应的dll

比如增加了Editor文件夹,就会增加Editor.dll

如果建了一个Assembly Definition(自己的程序集),然后再放在一个文件夹,就会把所有的文件夹内的脚本都从属于这个dll文件下

在根目录下的脚本,则属于Csharp.dll下

[展开全文]
sdewqazxcds · 2020-03-26 · 0

调用父物体中的脚本方法

transform.parent.SendMessage("PutOff", currentItemUI.Item);

[展开全文]
一世界一人生 · 2020-03-15 · 0

需要重看

[展开全文]
zecymo · 2020-03-15 · 0

获取场景:

Laya.stage.getChildAt(0).getChildAt(0)

[展开全文]
极光流刃 · 2020-03-12 · 0

mysql 打开方式

[展开全文]
高伟程 · 2020-03-10 · 0

关于Laya.loader.load函数里loadProgress的回调函数:

这个回调函数不能使用Laya.Handler.create(this,func)这种默认的形式,因为这种默认创造Handler的方式会使其调用一次后就被Handler回收器回收,而进度条处理函数需要不断被调用。

所以这里我们只能使用两种创建方式:

1. create(this,func,argus,false)来指定第四个是否调用一次的参数为false,保证不会在调用一次后就被回收。

2. new Laya.Hander()来直接调用构造函数创建一个新Handler对象。

从性能优化角度,推荐使用回收池的形式,也就是第一种方法。

[展开全文]
极光流刃 · 2020-03-02 · 0

老师啥都完美 就是英语差点

country 是国家

[展开全文]
rifle55 · 2020-03-01 · 0

非常实际和实用 谢谢老师

[展开全文]
rifle55 · 2020-03-01 · 0

关于Laya和Cocos父子节点的坑:

对父物体的位置移动和旋转并不会导致其子物体Collider组件位置的移动,必须直接对子物体进行操作才行。

而这点在Unity中是自动同步的。

所以要是在这两个引擎中构建场景:

切记切记,父子物体的嵌套层级不可太多,以最多三层为优

[展开全文]
极光流刃 · 2020-02-29 · 1

 //游戏暂停
        Time.timeScale = 0;

 //继续游戏
        Time.timeScale = 1;

[展开全文]
微凉123 · 2020-02-27 · 0

老师,你好,我想开发一套自己公司用的计划/采购/仓库系统,计划是Excel牵头,学习mysql,mysql可以作为我系统的数据库吗? 求指点。

两边内容同步学习。

[展开全文]
Iron老黄牛 · 2020-02-27 · 0

关于List里的tweenTo()可以有更好的实现方式:

this.owner.getChildByName("btn_Left").on(Laya.Event.CLICK,this,function(){
            this.characterList.tweenTo(this.characterList.startIndex-1,300);
        });
        this.owner.getChildByName("btn_Right").on(Laya.Event.CLICK,this,function(){
            this.characterList.tweenTo(this.characterList.startIndex+1,300);
        });

可以直接通过List.startIndex获得当前list显示内容里的第一项,不必通过scrollBar.value的值间接进行计算。

这样做的好处:

可以避免计算不精确而导致的一系列问题;

可以适配Item项数目有增减的场合

[展开全文]
极光流刃 · 2020-02-23 · 1

1.控制台操作MySQL

将mysql.exe

拖入控制台,登录MySQL账号密码,进入MySQL

 

2.MySQL自带操作命令

show databases;  显示当前的数据库

create database 数据库名字; 创建新的数据库

drop  database 数据库名字;删除某个数据库

use 数据库名字; 选择使用某个数据库

 

[展开全文]
mldsj · 2020-02-22 · 0

1.关于renderHandler所带的默认回调参数

this.characterList.renderHandler = Laya.Handler.create(this,this.listRenderHandler,null,false);

在Handler.creat()方法里,给回调函数传入的参数为null,那么为何能在后面的listRenderHandler(cell,index)函数声明里取得这两个参数?

检查List的源码中渲染Item的函数:

renderItem(cell, index) {
            if (this._array && index >= 0 && index < this._array.length) {
                cell.visible = true;
                if (cell["_$bindData"]) {
                    cell["_dataSource"] = this._array[index];
                    this._bindData(cell, this._array[index]);
                }
                else
                    cell.dataSource = this._array[index];
                if (!this.cacheContent) {
                    this.posCell(cell, index);
                }
                if (this.hasListener(Laya.Event.RENDER))
                    this.event(Laya.Event.RENDER, [cell, index]);
                if (this.renderHandler)
                    this.renderHandler.runWith([cell, index]);
            }

 可以发现当List存在renderHandler属性不为空时,调用了Handler里的runWith()方法默认为renderHandler的回调函数添加了两个参数。

 

2.关于runWith()方法

this.characterList.renderHandler = Laya.Handler.create(this,this.listRenderHandler,this.text,false);

还是上面的例子,如果在creat()函数里手动给回调函数传入了参数,那么listRenderHandler(cell,index)函数反而不能正常工作,这又是为什么?

检查Handler源码中的runWith()方法:

runWith(data) {
            if (this.method == null)
                return null;
            var id = this._id;
            if (data == null)
                var result = this.method.apply(this.caller, this.args);
            else if (!this.args && !data.unshift)
                result = this.method.call(this.caller, data);
            else if (this.args)
                result = this.method.apply(this.caller, this.args.concat(data));
            else
                result = this.method.apply(this.caller, data);
            this._id === id && this.once && this.recover();
            return result;
        }

可以发现如果我们手动给回调函数传入了参数,这里会使用concat()方法将默认传入的参数拼接到已传入参数的后方(用上面的例子来说就是renderHandler回调函数拥有了三个回调参数,其中第一个时手动指定的,后两个时默认传入的);

只有当没有手动传入任何回调参数时,runWith()方法会将回调函数的参数指定为默认参数,这也说明了为什么我们没有在creat()中传入任何回调参数而却能够使用cell和index这两个默认回调参数

[展开全文]
极光流刃 · 2020-02-22 · 1

Particle System粒子系统

 

 

[展开全文]
鬼猫三岁 · 2020-02-19 · 0

1.distinct 去重

mysql> select distinct first_name from actor order by first_name;

2.between

select * from  id where between 1 and 9;

 

3.like  模糊搜索

(1)select * from category where name like 'A%';

(2)select * from category where name like 'A_';搜索几个 添加几个'_'

(3)select * from category where name like '%i%';

[展开全文]
mldsj · 2020-02-15 · 0

拼接字符串左取字符串

获取字符串长度

替换

反转

[展开全文]
mldsj · 2020-02-15 · 0