Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi people,

My name is Cynthia and I need some help with Object-oriented programming. I have a project for school where I'am making a 2D platformer game with Unity. Where I have to make a base class and two child classes that inherits from it. I have to work with constructors, properties, etc .

The problem is I kinda know what the constructors, properties etc do but I don't know how to put them together to make a game.

Can someone help me, push me into the right direction cause now I don't know where to begin with.

What I like to make is a Enemy base class with two sub classes (enemy 1 and enemy 2) or base class Item (sort of coins or power ups) with two sub classes (item 1 and item 2).

I don't ask for a finished script but someone who can help me making it or giving tips or something.

If there is someone who can help I would be so grateful.

(I program in C# and the game must be made in Unity).
Sorry if this is not the right place for asking such a thing.

Thanks
Cynni
Posted
Comments
Sergey Alexandrovich Kryukov 23-Jun-15 9:23am    
Your problem is the lack of subject and mixing up the question with a part of the possible solution.
You see, you cannot ask what classes you should have and tell us that you want one base class and two derived ones. If you decided on that what would be the question.

More importantly, the decision on classes require knowledge on the entities behind them. To decide on having some base class and some derived class, you need to understand what part of functionality should be implemented and some requirements, or the semantic of the functionality. Without all that, this is a talking about nothing.

—SA

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900