DaVikingCode / Citrus-Engine

Modern AS3 Game Engine
http://citrusengine.com/
Other
549 stars 231 forks source link

modification? - swap 'name / params' parameters around #260

Closed Snky closed 7 years ago

Snky commented 9 years ago

Hopefully this is not just my preference, but I have indeed found it a lot easier after swapping these two parameters in every class around, as you can inside params { name: "........." , ... }, or even per class set a default name like so:

public function SnkyNape( params:Object = null , name:String = "SnkyNape-blueprint" ){
    super( params , name );

public class o_nape_cog extends SnkyNape {
public function o_nape_cog( params:Object = null , name:String = "o_nape_cog-undefined" ){
    super( params , name );

.. on top of the fact you can set the name inside params, I personally feel it's a bit of a burden how much importance name has been given that it's a must to give one to each object as you create them / create classes.

Again only a thought for the community, it doesn't really bother me, but even if this saves like 10 seconds per creating a class, I'm a lot more at ease now.

After a good little think, I think you'll agree at least, that params has a much greater significance in priority.

gsynuh commented 9 years ago

Hi, I'm making the move to no name argument at all. I think its useless to even have it... name would be extracted from the params object, if it doesn't exist there, a default name of citrusObjectInstance_X will be set where X is the citrus object 'unique' ID.

gsynuh commented 7 years ago

done as of a29b29e0e1bc39964b413f7a5299e497b756a7ca