Class CollisionHandler

    Definition

    Namespace:
    Tizen.NUI.Physics2D.Chipmunk
    Assembly:
    Tizen.NUI.Physics2D.dll

    A collision handler is a set of 4 function callbacks for the different collision events that Chipmunk recognizes. Collision callbacks are closely associated with Arbiter objects. You should familiarize yourself with those as well. Note #1: Shapes tagged as sensors (Sensor == true) never generate collisions that get processed, so collisions between sensor shapes and other shapes will never call the post_solve() callback. They still generate begin() and separate() callbacks, and the pre_solve() callback is also called every frame even though there is no collision response. Note #2: pre_solve() callbacks are called before the sleeping algorithm runs. If an object falls asleep, its post_solve() callback won’t be called until it’s re-awoken.

    public sealed class CollisionHandler
    Inheritance
    object
    CollisionHandler

    Properties

    View Source

    Begin

    This function is called when two shapes with types that match this collision handler begin colliding

    Declaration
    public Action<Arbiter, Space, object> Begin { get; set; }
    Property Value
    Type Description
    Action<, , ><Arbiter, Space, object>
    View Source

    Data

    User definable context pointer that is passed to all of the collision handler functions.

    Declaration
    public object Data { get; set; }
    Property Value
    Type Description
    object
    View Source

    PostSolve

    This function is called each step when two shapes with types that match this collision handler are colliding. It's called after the collision solver runs so that you can read back information about the collision to trigger events in your game.

    Declaration
    public Action<Arbiter, Space, object> PostSolve { get; set; }
    Property Value
    Type Description
    Action<, , ><Arbiter, Space, object>
    View Source

    PreSolve

    This function is called each step when two shapes with types that match this collision handler are colliding. It's called before the collision solver runs so that you can affect a collision's outcome.

    Declaration
    public Func<Arbiter, Space, object, bool> PreSolve { get; set; }
    Property Value
    Type Description
    Func<, , , ><Arbiter, Space, object, bool>
    View Source

    Separate

    This function is called when two shapes with types that match this collision handler stop colliding.

    Declaration
    public Action<Arbiter, Space, object> Separate { get; set; }
    Property Value
    Type Description
    Action<, , ><Arbiter, Space, object>
    View Source

    TypeA

    In the collision handler callback, the shape with this type will be the first argument. Read only.

    Declaration
    public int TypeA { get; }
    Property Value
    Type Description
    int
    View Source

    TypeB

    In the collision handler callback, the shape with this type will be the second argument. Read only.

    Declaration
    public int TypeB { get; }
    Property Value
    Type Description
    int

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX