Пример #1
0
    void addEnchantments()
    {
        GameObject target1 = GameObject.Find("LevitateFloatingBox");
        GameObject target2 = GameObject.Find("MoveFloatingBox");
        GameObject target3 = GameObject.Find("TransportFloatingBox");

        June june1 = new JuneWithDefault(target1, "Levitate.java", Application.dataPath + "/Vendor/CodeSpells/JavaSourceFiles/Levitate.java");
        (target1.GetComponent("Enchantable") as Enchantable).enchant(june1, delegate(GameObject t){item.absorbSpell(t); });

        June june2 = new JuneWithDefault(target2, "Move.java", Application.dataPath + "/Vendor/CodeSpells/JavaSourceFiles/Move.java");
        (target2.GetComponent("Enchantable") as Enchantable).enchant(june2, delegate(GameObject t){item.absorbSpell(t); });

        June june3 = new JuneWithDefault(target3, "Transport.java", Application.dataPath + "/Vendor/CodeSpells/JavaSourceFiles/Transport.java");
        (target3.GetComponent("Enchantable") as Enchantable).enchant(june3, delegate(GameObject t){item.absorbSpell(t); });
    }
Пример #2
0
    void addEnchantments()
    {
        GameObject target1 = GameObject.Find("LevitateFloatingBox");
        GameObject target2 = GameObject.Find("MoveFloatingBox");
        GameObject target3 = GameObject.Find("TransportFloatingBox");

        June june1 = new JuneWithDefault(target1, "Levitate.java", Application.dataPath + "/Vendor/CodeSpells/JavaSourceFiles/Levitate.java");

        (target1.GetComponent("Enchantable") as Enchantable).enchant(june1, delegate(GameObject t){ item.absorbSpell(t); });

        June june2 = new JuneWithDefault(target2, "Move.java", Application.dataPath + "/Vendor/CodeSpells/JavaSourceFiles/Move.java");

        (target2.GetComponent("Enchantable") as Enchantable).enchant(june2, delegate(GameObject t){ item.absorbSpell(t); });

        June june3 = new JuneWithDefault(target3, "Transport.java", Application.dataPath + "/Vendor/CodeSpells/JavaSourceFiles/Transport.java");

        (target3.GetComponent("Enchantable") as Enchantable).enchant(june3, delegate(GameObject t){ item.absorbSpell(t); });
    }