// === 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())); } }
public void cs_step(string directionName) { context.RunRoutineFromLua(mapEvent.GetComponent <MapEvent>().StepRoutine(EightDirExtensions.Parse(directionName))); }
// === CALLED BY LUA === public void face(string directionName) { mapEvent.GetComponent <CharaEvent>().facing = EightDirExtensions.Parse(directionName); }
public void cs_walk(string directionName, int count) { context.RunRoutineFromLua(mapEvent.GetComponent <MapEvent>().StepMultiRoutine(EightDirExtensions.Parse(directionName), count)); }