void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "PlatformSpawner") { CursorController cursorController = other.gameObject.GetComponent <CursorController>(); if (!cursorController.phasing || !canPhase) { cursorController.Kill(); } } }