Giter Club home page Giter Club logo

Comments (4)

yanmingjie0223 avatar yanmingjie0223 commented on June 14, 2024

有人说过同样的问题,也想过写个小游戏demo。只是一直比较忙,可能会比较晚写。可以先看看代码,尝试着用,有什么问题发邮件什么的都可以😊

from cocoscreator.

IOXBruin avatar IOXBruin commented on June 14, 2024

感谢回复,已经看过代码了。
1、可能是我mvc模型理解不够,架构中view的ctrl代码应该怎么写,因为代码中只是继承了一个basectrl。
2、还有就是m和c,v和c之间通信的写法有点迷茫。
3、其实不用写一个完整的demo,只要详细写一个完整的mvc流程就好,v初始化的怎么获取m的数据,m数据变化的时候怎么通知v改变显示。这个过程中c到底扮演怎样的角色,到底该怎么写。
感谢大佬写这么好的架构让我学习

from cocoscreator.

yanmingjie0223 avatar yanmingjie0223 commented on June 14, 2024

谢谢你的认可😊
1:mvc一般是c控制m和v的逻辑,m提供数据更新的接口,m变化通知c。v中提供界面变化的接口,v变化通知c
2:按照上面的逻辑来使用有的模块比较大会导致c特别的大显得臃肿(特别不利于维护),综合一下可以将部分逻辑拆分到m(偏向m)和v(偏向v)中。不管怎么拆分一定要保证c的控制权力,这样可以保持一个口子进就可以完成一个完整系列的功能

from cocoscreator.

IOXBruin avatar IOXBruin commented on June 14, 2024

感谢大佬指点迷津,我先写写试试。如果还是觉得不是很清楚,我就自己写个小Demo让大佬帮我看看改进一下。

from cocoscreator.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.