package com.jan.Collision;

import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.Contact;
import com.jan.scene.Entity;



public class CollisionEvent {
    public enum COLLISION_STATE {BEGIN, END};
    public enum COLLISION_TYPE {TERAIN, OBJECT};

    private Colider entityA;
    private Colider entityB;

    private COLLISION_TYPE type;
    private COLLISION_STATE state;

    private Contact contact;

    public CollisionEvent(Colider entityA, Colider entityB, COLLISION_STATE state, Contact contact){
        this.entityA = entityA;
        this.entityB = entityB;
        this.state = state;
        this.type = COLLISION_TYPE.OBJECT;
        this.contact = contact;
    }

    public CollisionEvent(int entityA, Colider entityB, COLLISION_STATE state, Contact contact){
        this.entityB = entityB;
        this.state = state;
        this.type = COLLISION_TYPE.TERAIN;
        this.contact = contact;
    }

    public Entity getEntityA(){ return entityA.getEntity(); }
    public Body getBodyA(){ return entityA.getBody(); }

    public Entity getEntityB(){ return entityB.getEntity(); }
    public Body getBodyB(){ return entityB.getBody(); }

    public COLLISION_TYPE getType(){ return type; }
    public COLLISION_STATE getState(){ return state; }

    public Contact getContact(){ return contact; }

}
