Exemplo n.º 1
0
    void Start()
    {
        Debug.Log(Application.persistentDataPath);
        myFileLogHandler = new MyFileLogHandler();

        logger.Log(kTAG, "MyGameClass Start.");
    }
Exemplo n.º 2
0
    public MyFileLogHandler()
    {
        //Setup instance
        instance = this;

        //use like this (from other files):
        //MyLogHandler.instance.Log("hello there");

        string filePath = Application.persistentDataPath + "/MyLogs.txt";

        m_FileStream   = new FileStream(filePath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
        m_StreamWriter = new StreamWriter(m_FileStream);

        // Replace the default debug log handler
        UnityEngine.Debug.unityLogger.logHandler = this;
    }
Exemplo n.º 3
0
    //List of Game Events
    //public List<GameEvent> gameEvents = new List<GameEvent>();

    // Start is called before the first frame update
    void Start()
    {
        UnityEngine.Debug.Log(Application.persistentDataPath);

        myFileLogHandler = new MyFileLogHandler();

        logger.Log(kTAG, "MyGameClass Start.");

        map = new Map("Green", "Assets/data/germany-sectors.dat", "Assets/data/germany-connections.dat");
        map.FindAdjacentSectorData();

        foreach (var sector in map.sectors)
        {
            UnityEngine.Debug.Log($"Sector {sector.name} is adjacent to:");

            foreach (var adj in sector.adjacentSectors)
            {
                UnityEngine.Debug.Log("\t" + adj.name);
            }
        }

        //foreach (var city in map.cities)
        //{
        //    UnityEngine.Debug.Log($"City {city.name} is adjacent to:");

        //    foreach (var adj in city.adjacentSectors)
        //        UnityEngine.Debug.Log("\t" + adj.name);
        //}


        List <City> allCities = map.getCityList();

        myCity = allCities[0];

        setUp = new SetUpPhase();
        setUp.SetDeckandMarket();
        setUp.SetResourceMarket();

        //Adding the players to the player list
        players.Add(new Player());
        players.Add(new Player());
        players.Add(new Player());
        //UnityEngine.Debug.Log(players);
    }