Citrus-Engine
Citrus-Engine copied to clipboard
Components.fla and Hero's dynamicFriction
Charlie, on the forums, (http://forum.starling-framework.org/topic/need-help-to-convert-ce2-game-to-new-engine-napestarlingce#post-21544) reported that using Components.fla triggers a warning as Components have the dynamicFriction property... which obviously gets set with the setParams() function in CitrusObjects (or in ObjectMaker) ... But dynamicFriction is not an available public var upon construction (at least that's what I feel the problem is) so the message : "Warning: The parameter dynamicFriction does not exist on [object Hero]" would always be traced when trying to set dynamicFriction through params. and specially when loading levels made from Components.fla .
(I'm not using the right terms nor I am explaining myself right, but surely when we try this["dynamicFriction"] = 10; in the parent of this class, then public function set dynamicFriction doesn't exist yet so the "super" is not aware of that property and throws an error right?)
That's weird because this works : [Inspectable(defaultValue="citrus.objects.platformer.nape.Enemy",type="String")] public function set enemyClass(value:*):void {
if (value is String)
_enemyClass = getDefinitionByName(value as String) as Class;
else if (value is Class)
_enemyClass = value;
}
But not this.. [Inspectable(defaultValue="1.7")] public function set dynamicFriction(value:Number):void {
_material.dynamicFriction = _dynamicFriction = value;
}
We've a warning but it works, very weird.
yeah I didn't think of this one. My argument doesn't work then... so either dynamicFriction doesn't work, or enemyClass just works by magic... Or we simply missed something important and interesting