int and float are primitives, not classes tho (well, they are in c, java is more... complicated; and l;ets not get into javascript)
You're right, I was thinking of java where I pratically always use Integer in place of int :P
However I think the galaxy editor Integer and Real are actually classes...
Rollback Post to RevisionRollBack
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
A class is an object project.
This object has many properties, called variables.
This object can also do many actions, called methods.
Some methods and variables can be seen from outside, they are called public methods and variables.
Some cannot, they are called private methods and variables.
A method is like a function, and a variable is still a variable, like the one you use normally also in the galaxy editor.
Since it is a function, a method can use parameters and return values. Some method are used, for example, to set or get the value of private variables from the outside of the class.
The outside of the class is the rest of the world, in a simple example an int main().
You can define variables using a class, passing values or variables as parameter to an "inizialization" method, called constructor.
Once a class is deleted, it invokes an other method, the so called destructor.
To clarify, a small example:
header.hpp:classrectangle:{private:// Variables definitionintx;inty;intheight;intwidth;public:// Methods definition: in order -> constructor, setter and getterrectangle(inth,intw,intpos_x=0,intpos_y=0);voidsetHeight(inth);intgetWidth();};source.cpp:#include <header.hpp>// Constructor declarationrectangle::rectangle(inth,intw,intpos_x,intpos_y){x=pos_x;y=pos_y;height=h;width=w;}voidrectangle::setHeight(inth){height=h;}intrectangle::getWidth(){returnwidth;}
You're right, I was thinking of java where I pratically always use Integer in place of int :P However I think the galaxy editor Integer and Real are actually classes...
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
I think we can guess that the editor itself is a class, like pretty much everything within.
Pretty much the entire game I dare to assume... ;)
Yes of course the unit types are classes, they are like int, float, or rectangle.
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.
A class is an object project. This object has many properties, called variables. This object can also do many actions, called methods.
Some methods and variables can be seen from outside, they are called public methods and variables. Some cannot, they are called private methods and variables.
A method is like a function, and a variable is still a variable, like the one you use normally also in the galaxy editor. Since it is a function, a method can use parameters and return values. Some method are used, for example, to set or get the value of private variables from the outside of the class.
The outside of the class is the rest of the world, in a simple example an int main(). You can define variables using a class, passing values or variables as parameter to an "inizialization" method, called constructor. Once a class is deleted, it invokes an other method, the so called destructor.
To clarify, a small example:
Battle.net wants to call me InsaneMst, Insane... but you should call me InsaneMonster!
Author of InsaneAI library, InsaneCredits library, InsaneDebug library, InsaneTransmission library, InsaneUI library and InsaneBriefing library.
Author of Mercenary Business - Top 10 Rock The Cabinet 2017: Co-op edition.