private void OnTriggerExit2D(Collider2D collision) { MovementWithAsset movement = collision.GetComponent <MovementWithAsset>(); if (movement != null) { NotificationCenter.Default.Post(this, NotificationKeys.OutTheLadder, collision.gameObject.name); Debug.Log("Ladder Trigger Out, " + collision.gameObject.name); } }
private void OnTriggerExit2D(Collider2D collision) { MovementWithAsset movement = collision.GetComponent <MovementWithAsset>(); if (movement != null) { NotificationCenter.Default.Post(this, NotificationKeys.OutTheFixablePipe, collision.gameObject.name); Debug.Log(this.gameObject.name + " Trigger Out, " + collision.gameObject.name); CurrentPlayer = null; } }
private void OnTriggerEnter2D(Collider2D collision) { //if (CurrentPlayer != null) return; MovementWithAsset movement = collision.GetComponent <MovementWithAsset>(); if (movement != null) { NotificationCenter.Default.Post(this, NotificationKeys.InTheFixablePipe, collision.gameObject.name); Debug.Log(this.gameObject.name + " Trigger In, " + collision.gameObject.name); CurrentPlayer = movement; } }
private void OnTriggerExit2D(Collider2D collision) { if (Picking) { return; } MovementWithAsset movement = collision.GetComponent <MovementWithAsset>(); if (movement != null) { if (movement.IsPicking) { return; } NotificationCenter.Default.Post(this, NotificationKeys.OutTheTool, collision.gameObject.name); Debug.Log(gameObject.name + " Trigger Out, " + collision.gameObject.name); OutlineObj.material.SetColor("_SolidOutline", Color.clear); } }