OzgeKocaoglu / persephoneCollision

Simple, collision system for unity. It is simple, fast, easy to use. For custom purposes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

persephoneCollision

Simple, collision system for unity. It is simple, fast, easy to use. For custom purposes.

logo

Simple, collision system for unity. It is simple, fast, easy to use. For custom purposes.


How to use?

  1. Add "Collision Box" to your character. You can add as child.
  2. Add this script to your class:
public CollisionBox collisionBox;
  
  // -----------------------------------------------------------------------
  public void OnEnable() 
  {
    collisionBox.collisionStart += collisionStart;
    collisionBox.collisionEnd += collisionEnd;
  }
  
  // -----------------------------------------------------------------------
  public void OnDisable() 
  {
    collisionBox.collisionStart -= collisionStart;
    collisionBox.collisionEnd -= collisionEnd;
  }
  
  // -----------------------------------------------------------------------
  public void collisionStart(CollisionBox box) 
  {
    Debug.Log("I'm collided with : " + box.name);
  }
  
  // -----------------------------------------------------------------------
  public void collisionEnd(CollisionBox box) 
  {
    Debug.Log("I'm not collided with : " + box.name + " anymore");
  }
  1. And ta da! You are ready to go!

What will be in the future?

I'm gonna add new collision types like sphere etc. I will add editor handles to edit more efficient.

About

Simple, collision system for unity. It is simple, fast, easy to use. For custom purposes.

License:MIT License


Languages

Language:C# 100.0%