208人加入学习
(18人评价)
基于MVC架构的俄罗斯方块开发(基于Unity2017)
价格 ¥ 120.00

下周学习 2021/5/5

[展开全文]
unitywen · 2021-05-05 · 该任务已被删除 0

1:mvc 

     m:model

     v : view

     c:controller

    增加可以重用性

2:创建好文件 脚本

3:

[展开全文]
哦你好 · 2018-03-29 · 该任务已被删除 0

1:mvc 

     m:model

     v : view

     c:controller

    增加可以重用性

2:创建好文件 脚本

 

[展开全文]
哦你好 · 2018-03-29 · 该任务已被删除 0

mvc

1、分层处理。

2、

[展开全文]
谢谢希望 · 2018-02-13 · 该任务已被删除 0

总是要去找Ctrl  何不做一个单例类呢

public abstract class InstanceMonoBehavior<T> : MonoBehaviour
    {
        private static T _instance;
        public static T GetInstance()
        {
            return _instance;
        }
        protected virtual void Awake()
        {
            _instance = ReturnInstance();
        }
 
        protected abstract T ReturnInstance();
    }

 

接下来将Ctrl 继承他

public class Ctrl : InstanceMonoBehavior<Ctrl>{

    protected override Ctrl ReturnInstance()
    {
        return this;
    }

}

 

在任何地方都可以使用Ctrl.GetInstance() 获得单例对象

 

 

[展开全文]
oOtroyOo · 2018-02-11 · 该任务已被删除 0

1.GameManager//核心逻辑属于控制层

Bool IsPause 游戏是否暂停

public Shape[] shapes;

给图形添加脚本Shape

public Clolor[] colors;

void SpawnShape(){

int index=Random.range(0,shape.lenth);

int indexColor=random.range(0,color.lenth);

Shape shape=Gameobject.Instantiate(shapes[index]);

shape.init(colors[indexClolor]);

}

[展开全文]
W1Z1 · 2018-01-14 · 该任务已被删除 0

授课教师

SiKi学院老师

课程特色

下载资料(1)
视频(40)