This page is about collision listeeners which means when this actor collides with something else. this listener detects collision then trigger some events.
events in design mode
Requires import com.stencyl.models.actor.Collision; in code mode.
code in general form. - all collision detecors in Stencyl uses this code
copied from preview mode
addCollisionListener(actor, function(event:Collision, list:Array<Dynamic>):Void
{
if(wrapper.enabled) // this is actually when this actor collides with something else
{
}
});
remove wrapper use in code mode
addCollisionListener(actor, function(event:Collision, list:Array<Dynamic>):Void
{
});
split and whithout import com.Stencyl.behavior.Script.*;
Script.addColisionListener(actor.col);
public function col(ev:Collision,unused_0){}
computational shortcut 1
actor.registerListener(actor.collisionListeners,col);
public function col(ev:Collision,unused_0){}
specific cases,
These cases are the extension to collision with something else except the bottom 2 ehuch are between types and between groups. .

No comments:
Post a Comment