public IEnumerator PathToRoutine(Vector2Int location) { List <Vector2Int> path = parent.FindPath(this, location); if (path == null) { yield break; } MapEvent mapEvent = GetComponent <MapEvent>(); foreach (Vector2Int target in path) { OrthoDir dir = mapEvent.DirectionTo(target); yield return(StartCoroutine(GetComponent <MapEvent>().StepRoutine(dir))); } }
public void faceToward(LuaMapEvent other) { mapEvent.GetComponent <CharaEvent>().Facing = mapEvent.DirectionTo(other.mapEvent); }