コード例 #1
0
    public void ResetSimulation()
    {
        gameState = SIMUL_STATE.INIT;

        simulStep = 0;

        localTime = 0.0f;

        isSimulPause = false;
        isMoveNext   = false;
    }
コード例 #2
0
 private void MoveNextStep_Internal()
 {
     if (gameState == SIMUL_STATE.MUTATION)
     {
         gameState = SIMUL_STATE.SIMULATION;
     }
     else
     {
         gameState++;
     }
 }
コード例 #3
0
    ////////////////////////////////////////////////////////////
    public void StartSimulation()
    {
        if (gameState != SIMUL_STATE.INIT)
        {
            return;
        }

        // 임시로 초기데이터 생성로직을 이곳에 둠.
        geneticManager.SetInitialGenericData();

        SpawnObjects();

        gameState = SIMUL_STATE.SIMULATION;
        RestartSimulation();
    }
コード例 #4
0
    ////////////////////////////////////////////////////////////
    void Awake()
    {
        Debug.Log("GameManager-Awake");

        curGeneration = 0;
        simulSpeed    = 2.0f;
        UnitTime      = 1.0f;

        localTime = 0.0f;

        gameState = SIMUL_STATE.INIT;
        simulStep = 0;

        isSimulPause = false;
        isMoveNext   = false;

        geneticManager = GeneticManager.Instance;
        geneticManager.CheckFitness = CheckFitness;

        objList = new List <TestObject>();
    }