public void kill() { var n = Board.instance.getNode(transform.position); var ob = n.obstruction; if (ob == transform) { n.obstruction = null; } if (GameManager.selected != null && GameManager.selected.transform == transform) { GameManager.selected.deselect(); } Debug.Log("Playing death animation"); JobManager.instance.EnqueueJob(killAnimation(gameObject)); JobManager.instance.EnqueueJob(GameObjectExtensions.IteratorDestroy(gameObject)); }