Exemplo n.º 1
0
    //Called by store when we purchase a creature
    public void AddCreatureToInventory(Creature creature)
    {
        creatureList.AddCreature(creature);
        GameObject newCreaturePanel = CreateCreatureObject(creature);

        newCreaturePanel.transform.SetParent(inventoryList.transform, false);
    }
Exemplo n.º 2
0
    private void PopulatePlayerInventory(CreatureList list)
    {
        list.AddCreature(CreatureManager.Manager.GetCreatureOfType(CreatureType.Slime));
        list.AddCreature(CreatureManager.Manager.GetCreatureOfType(CreatureType.Slime));

        /*
         * list.AddCreature(CreatureManager.Manager.GetCreatureOfType(CreatureType.Arachnid));
         * list.AddCreature(CreatureManager.Manager.GetCreatureOfType(CreatureType.Avian));
         * list.AddCreature(CreatureManager.Manager.GetCreatureOfType(CreatureType.Canine));
         * list.AddCreature(CreatureManager.Manager.GetCreatureOfType(CreatureType.Demon));
         * list.AddCreature(CreatureManager.Manager.GetCreatureOfType(CreatureType.Dragon));
         * list.AddCreature(CreatureManager.Manager.GetCreatureOfType(CreatureType.Equine));
         */
        foreach (var creature in creatureList.Creatures)
        {
            GameObject newCreaturePanel = CreateCreatureObject(creature);
            newCreaturePanel.transform.SetParent(inventoryList.transform, false);
        }
    }
Exemplo n.º 3
0
 void Update()
 {
     while (creatureList.Creatures.Count < creatureCount)
     {
         CreatureData newCreature = CreatureManager.Manager.GetRandomCreature();
         Creature     creature    = new Creature(newCreature);
         creatureList.AddCreature(creature);
         GameObject newCreaturePanel = GetCreaturePanel(creature);
         newCreaturePanel.transform.SetParent(StoreListFrame.transform, false);
     }
 }
Exemplo n.º 4
0
    private void PopulateStore(CreatureList list)
    {
        if (list.Creatures.Count < creatureCount)
        {
            //Fill the list with random creatures of the type we want
            for (int i = 0; i < creatureCount; i++)
            {
                list.AddCreature(CreatureManager.Manager.GetRandomCreature());
            }
        }

        foreach (var creature in creatureList.Creatures)
        {
            GameObject newCreaturePanel = GetCreaturePanel(creature);
            newCreaturePanel.transform.SetParent(StoreListFrame.transform, false);
        }
    }