public void AddSeed(Plant.Type seedType) { CollecableSeed temp = ScriptableObject.CreateInstance("CollecableSeed") as CollecableSeed; temp = Resources.Load <CollecableSeed>(CollecableSeed.seedDictionary[seedType]); addItem(temp); }
public void UseFruit(Plant.Type seedType) { CollecableSeed temp = ScriptableObject.CreateInstance("CollecableSeed") as CollecableSeed; temp = Resources.Load <CollecableSeed>(CollectableFruit.FruitDictionary[seedType]); useItem(temp); }
public void loadAnimation(Plant.Type seedType) { CollecableSeed temp = ScriptableObject.CreateInstance("CollecableSeed") as CollecableSeed; temp = Resources.Load <CollecableSeed>(CollecableSeed.seedDictionary[seedType]); string path = "PlantAnimate/" + temp.name; AnimationClip ani = Resources.Load <AnimationClip>(path); overrideController["Aquabud"] = ani; anim.runtimeAnimatorController = overrideController; }