private void InstantiateAction(StudentAction action) { if (action.Equals(StudentAction.NullAction)) { return; } if (!action.HasObjectInput()) { return; } //Debug.Log(action); XmlNodeList objects = action.InputXML.SelectNodes(Logger.OBJECT); if (objects.Count == 0) { return; } else { foreach (XmlNode node in objects) { GameObject gob = SpawnObject(node, action); if (gob != null) { gob.GetComponent <ReplayBehavior>().ReplayTag = ReplayBehavior.RAETag.Action; extender.SpecializeNewObject(gob, node, action); } } } }
private void InstantiateState(StudentAction action) { if (action.Equals(StudentAction.NullAction)) { return; } ClearState(); ClearAction(); if (action.StateXML != null) { XmlNodeList objects = action.StateXML.SelectNodes(Logger.OBJECT); foreach (XmlNode entry in objects) { if (entry[Logger.NAME].InnerText != action.Selection) { GameObject gob = SpawnObject(entry, action); if (gob != null) { gob.GetComponent <ReplayBehavior>().ReplayTag = ReplayBehavior.RAETag.State; extender.SpecializeNewObject(gob, entry, action); } } } } }
private void InstantiateStartState(StudentAction startState) { if (startState.Equals(StudentAction.NullAction) || startState.Action != Logger.START_STATE) { return; } ClearState(); ClearAction(); ClearStartState(); if (startState.StateXML != null) { XmlNodeList objects = startState.StateXML.SelectNodes(Logger.OBJECT); foreach (XmlNode entry in objects) { GameObject gob = SpawnObject(entry, startState); if (gob != null) { gob.GetComponent <ReplayBehavior>().ReplayTag = ReplayBehavior.RAETag.StartState; extender.SpecializeNewObject(gob, entry, startState); } } } }
private void InstantiateState(StudentAction action) { if (action.Equals(StudentAction.NullAction)) return; ClearState(); ClearAction(); if (action.StateXML != null) { XmlNodeList objects = action.StateXML.SelectNodes(Logger.OBJECT); foreach (XmlNode entry in objects) { if (entry[Logger.NAME].InnerText != action.Selection) { GameObject gob = SpawnObject(entry, action); if (gob != null) { gob.GetComponent<ReplayBehavior>().ReplayTag = ReplayBehavior.RAETag.State; extender.SpecializeNewObject(gob, entry, action); } } } } }
private void InstantiateStartState(StudentAction startState) { if (startState.Equals(StudentAction.NullAction) || startState.Action != Logger.START_STATE) return; ClearState(); ClearAction(); ClearStartState(); if (startState.StateXML != null) { XmlNodeList objects = startState.StateXML.SelectNodes(Logger.OBJECT); foreach (XmlNode entry in objects) { GameObject gob = SpawnObject(entry, startState); if (gob != null) { gob.GetComponent<ReplayBehavior>().ReplayTag = ReplayBehavior.RAETag.StartState; extender.SpecializeNewObject(gob, entry, startState); } } } }
private void InstantiateAction(StudentAction action) { if (action.Equals(StudentAction.NullAction)) return; if (!action.HasObjectInput()) return; //Debug.Log(action); XmlNodeList objects = action.InputXML.SelectNodes(Logger.OBJECT); if (objects.Count == 0) { return; } else foreach (XmlNode node in objects) { GameObject gob = SpawnObject(node, action); if (gob != null) { gob.GetComponent<ReplayBehavior>().ReplayTag = ReplayBehavior.RAETag.Action; extender.SpecializeNewObject(gob, node, action); } } }