public object getProperty(string actorName, Map.EActorProperties property) { object propertyVal = null; foreach (CComponent component in _componentRegistry) { if ((propertyVal = component.getProperty(actorName, property)) != null) { return(propertyVal); } } return(propertyVal); }
public object getProperty(string actorName, Map.EActorProperties property) { if (!actors.Keys.Contains(actorName)) { if (root.name == actorName) { return(propertySwitch(root, property)); } return(null); } CActor actor = actors[actorName]; return(propertySwitch(actor, property)); }
private object propertySwitch(CActor actor, Map.EActorProperties property) { switch (property) { case Map.EActorProperties.POSITION: return(actor.position); case Map.EActorProperties.COMPONENT_ADDRESS: return(actor.componentAddress); case Map.EActorProperties.OLD_POSITION: return(actor.oldPosition); case Map.EActorProperties.DIRECTION: return(actor.direction); default: return(null); } }
public static object propertyGetterFromComponent(int componentAddress, string actorName, Map.EActorProperties property) { return(_currentMap.getProperty(componentAddress, actorName, property)); }
public static object propertyGetter(string actorName, Map.EActorProperties property) { return(_currentMap.getProperty(actorName, property)); }