public override void Reason(GameObject gm, GameObject npc) { if (controlref.transform.position.x == controlref.goalPos.x && controlref.transform.position.y == controlref.goalPos.y) { controlref.GetComponent<TileFSM>().SetTransition(Transition.FinishedSetup); } }
public override void DoBeforeEntering() { int sl = -(int)Mathf.Floor(controlref.goalPos.y / controlref.tileSize); if (controlref.goalPos.y > controlref.transform.position.y) { --sl; } controlref.GetComponent<TileFSM>().setSortingLayer(sl); }