Наследование: DraggableItem
Пример #1
0
    void givePlayerASpellbook()
    {
        GameObject book = new GameObject();

        book.name = "Book";
        book.AddComponent <SpellbookItem>();
        SpellbookItem item = book.GetComponent <SpellbookItem>();

        item.item_name = "Spells";

        Inventory inventory = GameObject.Find("Inventory").GetComponent <Inventory>();

        inventory.addItem(book);

        Spellbook spellbook = GameObject.Find("Spellbook").GetComponent <Spellbook>();
        Badgebook badgebook = GameObject.Find("Badgebook").GetComponent <Badgebook>();

        spellbook.Add(new FilePage("MySpell", "MySpell/texture", "MySpell/code"));
        //spellbook.Add(new FilePage("MassiveLevitation", "MassiveLevitation/texture", "MassiveLevitation/code"));
        //spellbook.Add(new FilePage("FollowTheLeader", "FollowTheLeader/texture", "FollowTheLeader/code"));
        spellbook.Add(new FilePage("Flame", "Flame/texture", "Flame/code"));
        spellbook.Add(new FilePage("Sentry", "Sentry/texture", "Sentry/code"));
        spellbook.Add(new FilePage("Levitate", "Levitate/texture", "Levitate/code"));
        spellbook.Add(new FilePage("AdeptLevitate", "AdeptLevitate/texture", "AdeptLevitate/code"));
        spellbook.Add(new FilePage("Teleport", "Teleport/texture", "Teleport/code"));
        spellbook.Add(new FilePage("Flight", "Flight/texture", "Flight/code"));
        spellbook.Add(new FilePage("Summon", "Summon/texture", "Summon/code"));
        //if(badgebook.Complete("helping_others_putting_something_high"))
        //{
        //spellbook.Add(new FilePage("MassiveFire", "MassiveFire/texture", "MassiveFire/code"));
        //spellbook.Add(new FilePage("Architecture", "Architecture/texture", "Architecture/code"));
        //spellbook.Add(new FilePage("Architecture2", "Architecture2/texture", "Architecture2/code"));
        //}
    }
Пример #2
0
    void givePlayerASpellbook()
    {
        GameObject book = new GameObject();

        book.name = "Book";
        book.AddComponent <SpellbookItem>();
        SpellbookItem item = book.GetComponent <SpellbookItem>();

        item.item_name = "Spells";

        Inventory inventory = GameObject.Find("Inventory").GetComponent <Inventory>();

        inventory.addItem(book);

        Spellbook spellbook = GameObject.Find("Spellbook").GetComponent <Spellbook>();

        spellbook.Add(new FilePage("MySpell", "MySpell/texture", "MySpell/code"));
        spellbook.Add(new FilePage("Flame", "Flame/texture", "Flame/code"));
        spellbook.Add(new FilePage("Sentry", "Sentry/texture", "Sentry/code"));
        spellbook.Add(new FilePage("AdeptLevitate", "AdeptLevitate/texture", "AdeptLevitate/code"));
        spellbook.Add(new FilePage("Teleport", "Teleport/texture", "Teleport/code"));
        spellbook.Add(new FilePage("Flight", "Flight/texture", "Flight/code"));
        spellbook.Add(new FilePage("Summon", "Summon/texture", "Summon/code"));
        spellbook.Add(new FilePage("MassiveFire", "MassiveFire/texture", "MassiveFire/code"));
        spellbook.Add(new FilePage("Architecture", "Architecture/texture", "Architecture/code"));
        spellbook.Add(new FilePage("Architecture2", "Architecture2/texture", "Architecture2/code"));
    }
Пример #3
0
    void givePlayerASpellbook()
    {
        GameObject book = new GameObject();

        book.name = "Book";
        book.AddComponent <SpellbookItem>();
        SpellbookItem item = book.GetComponent <SpellbookItem>();

        item.item_name = "Spells";

        Inventory inventory = GameObject.Find("Inventory").GetComponent <Inventory>();

        inventory.addItem(book);

        Spellbook spellbook = GameObject.Find("Spellbook").GetComponent <Spellbook>();

        spellbook.Add(new FilePage("MySpell", "MySpell/texture", "MySpell/code"));
        spellbook.Add(new FilePage("Flame", "Flame/texture", "Flame/code"));
        spellbook.Add(new FilePage("Sentry", "Sentry/texture", "Sentry/code"));
        spellbook.Add(new FilePage("AdeptLevitate", "AdeptLevitate/texture", "AdeptLevitate/code"));
        spellbook.Add(new FilePage("Teleport", "Teleport/texture", "Teleport/code"));
        spellbook.Add(new FilePage("Flight", "Flight/texture", "Flight/code"));
        spellbook.Add(new FilePage("Summon", "Summon/texture", "Summon/code"));
        spellbook.Add(new FilePage("MassiveFire", "MassiveFire/texture", "MassiveFire/code"));
        spellbook.Add(new FilePage("Architecture", "Architecture/texture", "Architecture/code"));
        spellbook.Add(new FilePage("Architecture2", "Architecture2/texture", "Architecture2/code"));

        /*spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/MySpell");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/Flame");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/Sentry");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/Levitate");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/AdeptLevitate");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/Teleport");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/Flight");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/Summon");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/MassiveFire");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/Architecture");
         * spellbook.page_urls.Add("http://cseweb.ucsd.edu/~srfoster/code_spells/Architecture2");*/
    }