Ejemplo n.º 1
0
    public void AddSeed(Plant.Type seedType)
    {
        CollecableSeed temp = ScriptableObject.CreateInstance("CollecableSeed") as CollecableSeed;

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

        temp = Resources.Load <CollecableSeed>(CollectableFruit.FruitDictionary[seedType]);
        useItem(temp);
    }
Ejemplo n.º 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;
    }