예제 #1
0
    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)));
        }
    }
예제 #2
0
 public void faceToward(LuaMapEvent other)
 {
     mapEvent.GetComponent <CharaEvent>().Facing = mapEvent.DirectionTo(other.mapEvent);
 }