/** Return the ingredient that is sized for the layer specified */ public GameObject GetContainerModelByType(FoodContainerType inType) { foreach (FoodContainer ingredient in _PickupIngredients) { if (ingredient.cont == inType) { //Spawn the ingredient in world and return to caller GameObject newIngredient = Instantiate(ingredient.gameObject); return(newIngredient); } } return(null); }
public void NavigateTo(ViewType type, FoodContainerType foodContainerType, int selectedItem) { var root = Application.Current.RootVisual as PhoneApplicationFrame; String url = views[type].ToString() + "?container=" + ContainerTypes[foodContainerType] + "&selectedItem=" + selectedItem; if (root != null) root.Navigate(new Uri(url, UriKind.Relative)); }
void Register(FoodContainerType type, String name) { if (ContainerTypes.ContainsKey(type)) //update { ContainerTypes[type] = name; return; } ContainerTypes.Add(type, name); //add }