private void Awake() { Instance = this; //call opening level item spawns here: //TEMPLATE: ItemWorld.SpawnItemWorld(new Vector2(4.5f, -0.04f), new Item { itemType = Item.ItemType.[ITEM TYPE HERE] }); //ItemWorld.SpawnItemWorld(new Vector2(-7.97f, 4.25f), new Item { itemType = Item.ItemType.serotoninCrumb }); //ItemWorld.SpawnItemWorld(new Vector3(0.68f, 1.15f, -5.0f), new Item { itemType = Item.ItemType.star }); }
void Awake() { if (instance == null) { instance = this; } else { Destroy(this.gameObject); } }
public dataModel.Item[] GetItemByIds(string[] itemIds, coreModel.ItemResponseGroup respGroup = coreModel.ItemResponseGroup.ItemLarge) { if (!itemIds.Any()) { return new dataModel.Item[] { } } ; //Used breaking query EF performance concept https://msdn.microsoft.com/en-us/data/hh949853.aspx#8 var retVal = Items.Include(x => x.Catalog).Include(x => x.Category).Where(x => itemIds.Contains(x.Id)).ToArray(); if ((respGroup & coreModel.ItemResponseGroup.Categories) == coreModel.ItemResponseGroup.Categories) { var relations = CategoryItemRelations.Where(x => itemIds.Contains(x.ItemId)).ToArray(); } if ((respGroup & coreModel.ItemResponseGroup.ItemProperties) == coreModel.ItemResponseGroup.ItemProperties) { var propertyValues = ItemPropertyValues.Where(x => itemIds.Contains(x.ItemId)).ToArray(); } if ((respGroup & coreModel.ItemResponseGroup.ItemAssets) == coreModel.ItemResponseGroup.ItemAssets) { var assets = ItemAssets.Where(x => itemIds.Contains(x.ItemId)).ToArray(); } if ((respGroup & coreModel.ItemResponseGroup.ItemEditorialReviews) == coreModel.ItemResponseGroup.ItemEditorialReviews) { var editorialReviews = EditorialReviews.Where(x => itemIds.Contains(x.ItemId)).ToArray(); } if ((respGroup & coreModel.ItemResponseGroup.ItemAssociations) == coreModel.ItemResponseGroup.ItemAssociations) { var associations = Associations.Where(x => itemIds.Contains(x.ItemId)).ToArray(); } if ((respGroup & coreModel.ItemResponseGroup.Variations) == coreModel.ItemResponseGroup.Variations) { var variationIds = Items.Where(x => itemIds.Contains(x.ParentId)).Select(x => x.Id).ToArray(); var variations = GetItemByIds(variationIds, respGroup); } //Load parents var parentIds = retVal.Where(x => x.Parent == null && x.ParentId != null).Select(x => x.ParentId).ToArray(); var parents = GetItemByIds(parentIds, respGroup); return(retVal); }
private void Awake() { Instance = this; }
private void Awake() { Debug.Log("i am awake"); Instance = this; }
private void Awake() { i = this; }
void Start() { Instance = this; }