Exemplo n.º 1
0
    public void PopulateObjectsInRoom(DynArray <RoomObject> objectsToPopulateWith)
    {
        if (objectsInRoom == null)
        {
            objectsInRoom = new DynArray <RoomObject>();
        }

        for (int i = 0; i < objectsToPopulateWith.GetSize(); i++)
        {
            objectsInRoom.AddToArray(objectsToPopulateWith[i]);
        }
        WriteButtons();
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        InitializeGameVars();

        //STICKYNOTE: This is for testing out the room functionality, delete this and make a better version after


        DynArray <RoomObject> objectsToExport = new DynArray <RoomObject>();
        GameObject            goobyObject     = (GameObject)Instantiate(Resources.Load("Prefabs/Gooby"));
        Enemy goobyEnemy = goobyObject.GetComponent <Enemy>();

        objectsToExport.AddToArray(goobyEnemy);

        GlobalVar.currentRoom.PopulateObjectsInRoom(objectsToExport);
    }
Exemplo n.º 3
0
 public void GetItem(Item ItemToGet)
 {
     itemsInInventory.AddToArray(ItemToGet);
 }