예제 #1
0
    public void AddSeed(Plant.Type seedType)
    {
        CollecableSeed temp = ScriptableObject.CreateInstance("CollecableSeed") as CollecableSeed;

        temp = Resources.Load <CollecableSeed>(CollecableSeed.seedDictionary[seedType]);
        addItem(temp);
    }
예제 #2
0
    public void UseFruit(Plant.Type seedType)
    {
        CollecableSeed temp = ScriptableObject.CreateInstance("CollecableSeed") as CollecableSeed;

        temp = Resources.Load <CollecableSeed>(CollectableFruit.FruitDictionary[seedType]);
        useItem(temp);
    }
예제 #3
0
    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;
    }