public virtual void Awake()
 {
     _character        = GetComponent <CharacterState>();
     _sprite           = GetComponent <Sprite>();
     _transform        = this.transform;
     _collisionHandler = GetComponent <AbstractCollisionHandler>();
 }
 public virtual void Awake()
 {
     _character = GetComponent<CharacterState>();
     _sprite = GetComponent<Sprite>();
     _transform = this.transform;
     _collisionHandler = GetComponent<AbstractCollisionHandler>();
 }
 /// <summary>
 /// The behavior to use for unknown colliders.  Unless overridden this will pass through to
 /// HandleCollision(other.collider, fromDirection, distance).
 /// </summary>
 public virtual void DefaultHandleCollision(AbstractCollisionHandler other, Vector3 fromDirection, float distance, Vector3 normal)
 {
     HandleCollision(other.collider, fromDirection, distance, normal);
 }
Пример #4
0
 public void Collide(AbstractCollisionHandler handler)
 {
     handler.Collides(this);
 }
 /// <summary>
 /// The behavior to use for unknown colliders.  Unless overridden this will pass through to
 /// HandleCollision(other.collider, fromDirection, distance).
 /// </summary>
 public virtual void DefaultHandleCollision(AbstractCollisionHandler other, Vector3 fromDirection, float distance)
 {
     HandleCollision(other.collider, fromDirection, distance);
 }