Exemple #1
0
    // === OUR ROUTINES ============================================================================

    private IEnumerator WalkRoutine(DynValue path)
    {
        PCEvent pc = Global.Instance().Maps.pc;

        foreach (DynValue dynDir in path.Tuple)
        {
            EightDir dir;
            if (dynDir.String.Equals("forward"))
            {
                dir = pc.GetComponent <CharaEvent>().facing;
            }
            else
            {
                dir = EightDirExtensions.Parse(dynDir.String);
            }
            yield return(pc.GetComponent <MapEvent>().StepRoutine(
                             pc.GetComponent <MapEvent>().location,
                             pc.GetComponent <MapEvent>().location + dir.XY()));
        }
    }
Exemple #2
0
 public void cs_step(string directionName)
 {
     context.RunRoutineFromLua(mapEvent.GetComponent <MapEvent>().StepRoutine(EightDirExtensions.Parse(directionName)));
 }
Exemple #3
0
    // === CALLED BY LUA ===

    public void face(string directionName)
    {
        mapEvent.GetComponent <CharaEvent>().facing = EightDirExtensions.Parse(directionName);
    }
Exemple #4
0
 public void cs_walk(string directionName, int count)
 {
     context.RunRoutineFromLua(mapEvent.GetComponent <MapEvent>().StepMultiRoutine(EightDirExtensions.Parse(directionName), count));
 }