Esempio n. 1
0
 private void OnTriggerEnter(Collider other)
 {
     SnakeCollisionHandler.Allowed();
     // Debug.Log(other.gameObject.tag);
     if (other.gameObject.tag != "SnakeBodyPart" && other.gameObject.tag != "InputSurface")
     {
         SnakeCollisionHandler.Handle(other.gameObject);
     }
     SnakeCollisionHandler.Forbidden();
 }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     if (!RotationHandler.IsRotating())
     {
         if (IsTouchingBody())
         {
             SnakeCollisionHandler.Allowed();
             SnakeCollisionHandler.Handle(this.gameObject);
             SnakeCollisionHandler.Forbidden();
         }
     }
 }