Esempio n. 1
0
 protected void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "Player")
     {
         RexActor rexActor = col.GetComponent <RexActor>();
         if (rexActor != null)
         {
             if (!IsActorAlreadyInList(rexActor))
             {
                 ActorWithSide actorWithSide = new ActorWithSide();
                 actorWithSide.actor = rexActor;
                 actorWithSide.side  = RexObject.Side.None;
                 actorsTouched.Add(actorWithSide);
                 CheckForEnter();
             }
         }
     }
 }
Esempio n. 2
0
 public override void NotifyOfCollisionWithPhysicsObject(Collider2D col, Side side, CollisionType type)
 {
     if (col.tag == "Player")
     {
         RexActor rexActor = col.GetComponent <RexActor>();
         if (rexActor != null)
         {
             if (!IsActorAlreadyInList(rexActor))
             {
                 if (side == actorSide)
                 {
                     ActorWithSide actorWithSide = new ActorWithSide();
                     actorWithSide.actor = rexActor;
                     actorWithSide.side  = side;
                     actorsTouched.Add(actorWithSide);
                     CheckForEnter();
                 }
             }
         }
     }
 }