Package com.sertaogames.cactus2d.components

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


    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

Related Classes of com.sertaogames.cactus2d.components.BoxCollider

Copyright © 2018 www.massapicom. 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.