Examples of BoxCollider


Examples of com.sertaogames.cactus2d.components.BoxCollider

    Vector2 offset = new Vector2(
        gameObject.spriteRenderer.spriteRegion.getRegionWidth()/2,
        gameObject.spriteRenderer.spriteRegion.getRegionHeight()/2);
   
    BoxCollider coll = new BoxCollider(
        new Vector2(gameObject.spriteRenderer.spriteRegion.getRegionWidth()/2, gameObject.spriteRenderer.spriteRegion.getRegionHeight()/2)
        , offset);
   
    gameObject.AddComponent(coll)
   
View Full Code Here

Examples of com.sertaogames.cactus2d.components.BoxCollider

    PhysicsComponent p = new PhysicsComponent(1, false, false);
    side.AddComponent(p);
   
    side.transform.getLocalPosition().set(location);
    Vector2 offset = new Vector2(dimensions).mul(0.5f);
    BoxCollider coll = new BoxCollider(dimensions, offset);
    side.AddComponent(coll);
   
    go.addGameObject(side);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.