Jump to content
  • Advertisement
Sign in to follow this  
Missle Launch

A simple class is bugging on a convention.

This topic is 4400 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

http://rafb.net/paste/results/vDUuiS17.html http://img414.imageshack.us/img414/4462/sonicgen19jp.th.gif I'm told I need to supply an instance of RunningSonic as the first argument. Isn't that made automatically? How is this thing broken?

Share this post


Link to post
Share on other sites
Advertisement
You never made an object of class RunningSonic. You just made the class. Similarly, you can eat an apple, but you cannot eat the concept of an apple. That's what a class is: a concept of a kind of object.

Share this post


Link to post
Share on other sites
sonic = RunningSonic()

Doing sonic = RunningSonic simply makes sonic a value equivalent to the class object RunningSonic. Yes, classes themselves are objects in Python.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!