Skip to content

OzgeKocaoglu/persephoneCollision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages