Exemplo n.º 1
0
    void TestBornMonster(Room room)
    {
        GameObject Prefab        = (ResourceManager.instance.GetAsset <GameObject>("Prefabs/MonsterObject"));
        GameObject monsterObject = Instantiate(Prefab);
        string     name          = "Monster";

        monster = monsterObject.GetComponent <MonsterObject>();
        Vector3 pos = room.GetRandomBlankFloor(objectPositions);

        monster.Init(0, room.RoomId, name, pos.x, pos.y);
        monster.GetComponent <AutoMoveObject>().SetRoom(room);
        objectPositions[pos] = 1;
    }