English 中文(简体)
不同类别的数据分离[封闭]
原标题:Separation of data in different classes [closed]
Closed. This question is opinion-based. It is not currently accepting answers.

不同类别的数据分离的最佳做法是什么? 不仅目标c,而且总体规划。

For example, if someone was making a game like angry birds, how one manage classes? Would you have a separate class for just the projectiles (in angry birds case, the birds) and have different classes for the targets, music and images, etc?

最佳回答

对此没有简单答案。 你们首先需要真正理解,深植于你们的灵魂,以目标为导向的方案规划如何运作,以及它所代表的内容。 然后,你需要根据这一理解和你对当前问题的理解作出自己的决定。

I ve seen many "cookbook" applications of OO and MVC and the like that are terrible, even though the writers dotted all the i s and crossed all the t s and their college professors would have given them an A+ on the project.

但一般而言,对于代表可见的、可移动的物体但可能不会用于音乐的实体,例如,我可能有一个通用的超级(由几个子级)。

问题回答

not even data but your functional approach must be modular. create as many smaller components in terms of classes and define their behavior as methods and set the interaction between them through the Game Manager/Logic control system that you design for your game...

Best of luck.!





相关问题
Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

JSON with classes?

Is there a standardized way to store classes in JSON, and then converting them back into classes again from a string? For example, I might have an array of objects of type Questions. I d like to ...

Object-Oriented Perl constructor syntax and named parameters

I m a little confused about what is going on in Perl constructors. I found these two examples perldoc perlbot. package Foo; #In Perl, the constructor is just a subroutine called new. sub new { #I ...

Passing another class amongst instances

I was wondering what is the best practice re. passing (another class) amongst two instances of the same class (lets call this Primary ). So, essentially in the constructor for the first, i can ...

Where can I find object-oriented Perl tutorials? [closed]

A Google search yields a number of results - but which ones are the best? The Perl site appears to contain two - perlboot and perltoot. I m reading these now, but what else is out there? Note: I ve ...

热门标签