public static Geology GetActiveGeology()
            {
                GameObject controllerHub = GameObject.Find("Controller Hub");
                Geology    geology       = controllerHub.GetComponent <GeologyController>().geology;

                return(geology);
            }
示例#2
0
    public void LoadGameState()
    {
        Debug.Log("gamestate loading");
        Instance instance = new Instance(currentInstanceJSONFileName);
        Unit     unit     = new Unit(leadUnitJSONFileName, 1, TargetTypes.Ally);
        Geology  geology  = UtilityFunctions.GetActiveGeology();

        geology.SetYear(year);
        geology.SetSeason(season);
        geology.SetDay(day);
        geology.SetTimeOfDay(time);
        geology.SetTimeSegment(timeSegment);
        geology.SetCurrentInstance(instance);

        UnitDetector unitDetector = UtilityFunctions.GetActiveUnitDetector();

        unitDetector.LoadNewInstance(instance, playerPosition, unit);
    }
示例#3
0
    public void StartGeology(Geology geology)
    {
        tireAppRunning = false;

        instructions.Clear();

        foreach (string instruction in geology.instructions)
        {
            instructions.Add(instruction);
        }
        // used for debugging
        totalGeoInstructions = instructions.Count;
        Debug.Log(totalGeoInstructions);

        // Initialize code count to -1. Because count is set to 0 in DisplayNextSentence method.
        geoInstructionNumber = -1;

        DisplayNextSentence();
    }