Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PotionData[] potions = PlayerGlobalData.Instance ().PotionsData.Potions;
- PotionConfiguration potionConfig = ConfigurationManager.Instance ().PotionConfig;
- foreach (PotionData potion in potions)
- {
- if (potion.State == PotionData.UNLOCKED_STATE)
- {
- if (!AvailablePotions.ContainsKey (potion.Type))
- {
- PotionElementConfiguration potionElemConfig = potionConfig.GetPotionConfigById (potion.Type);
- PotionCreator potionCreation = (new GameObject ("potion_creation_" + potion.Type, typeof(PotionCreator))).GetComponent<PotionCreator> ();
- potionCreation.name = "_" + potionCreation.name;
- //potionCreation.PotionData = potion;
- potionCreation.PotionElementConfiguration = potionElemConfig;
- potionCreation.OnPotionCreated += HandleOnPotionCreated;
- potionCreation.Resume ();
- potionCreation.transform.parent = transform;
- AvailablePotions [potion.Type] = potionCreation;
- }
- else
- {
- AvailablePotions [potion.Type].Resume ();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement