public override void InitSystems(GameManager game) { foreach (int entity in _entityList) { _transform = game.Entities.GetComponentOf<GTransform>(entity); } }
public static GTransform Make(int entityID, Vector3 position, Vector2 bounds) { GTransform comp = new GTransform (); comp.EntityID = entityID; comp._bounds = bounds; comp.FamilyID = 0; comp._position = position; return comp; }
public static GTransform Make(int entityID, Vector3 position, Vector2 bounds) { GTransform comp = new GTransform(); comp.EntityID = entityID; comp._bounds = bounds; comp.FamilyID = 0; comp._position = position; return(comp); }
private bool checkCollision(GTransform transform, Vector3 nodePos) { //Debug.Log("NodePos " + nodePos); if (Mathf.Abs(transform._position.x - nodePos.x) < 0.1f && Mathf.Abs(transform._position.z - nodePos.z) < 0.1f) { return true; } else return false; }
private bool checkFullCollision(GTransform transform, Vector3 nodePos) { if (Mathf.Abs(transform._position.x - nodePos.x) < 0.1f && Mathf.Abs(transform._position.z - nodePos.z) < 0.1f && Mathf.Abs((transform._position.y+ transform._bounds.y/2 +0.05f) - nodePos.y) <1.6f) { return true; } else return false; }