Location myLocation; //make into location object #endregion Fields #region Constructors public Feature(FEATURETYPE inType, string inName, Location inLocation) { featureType=inType; featureName=inName; myLocation=inLocation; //if (!(userinterfaceHolder)) userinterfaceHolder=GameObject.Find("UserInterface"); }
public void addFeature(FEATURETYPE featureToAdd) { switch (featureToAdd) { case FEATURETYPE.STAIRSDOWN: feature=new Feature(featureToAdd, "stairsdown", this); break; case FEATURETYPE.STAIRSUP: feature=new Feature(featureToAdd, "stairsup", this); break; } }
public Location getLocationOfFeature(int level, FEATURETYPE featureLocationToGet) { List<Location> locations=getAllLevelLocations(level); Location tempLocation=null; foreach(Location location in locations) { if (location.getFeature()!=null && location.getFeature().getFeatureType()==featureLocationToGet) { tempLocation=location; break; } } return tempLocation; }
public GameObject getDisplayObject(FEATURETYPE feature) { GameObject tempGameObject=null; switch (feature) { case FEATURETYPE.STAIRSDOWN: tempGameObject=(GameObject) Instantiate(stairsdown); break; case FEATURETYPE.STAIRSUP: tempGameObject=(GameObject) Instantiate(stairsup); break; } return tempGameObject; }