コード例 #1
0
 public void SetCurrentPassport(Passport p)
 {
     currentPassport = p;
     InitPassportStateDictionary();
     if (cs != null)
     {
         cs.SetHelpScreen(GeComputerScreentText(1));
         cs.RefreshScreens();
     }
 }
コード例 #2
0
    public void ChangeMainAgent(int i)
    {
        if (currentAgentId >= 0)
        {
            // hide current agent
            agentObjects_current[currentAgentId].SetActive(false);
        }

        if (i >= 0 && i < agentObjects_current.Length)
        {
            // set new current agent
            currentAgentId = i;
            agentObjects_current[currentAgentId].SetActive(true);
            linker.SetAgent(agentLogic_current[currentAgentId]);

            if (currentScenarioType == ScenarioType.PASSPORT)
            {
                Passport p = new Passport();

                currentPassport = p;

                p.InitRandomPassport(IsMale(i));

                cs.ClearPassportScreen();
                cs.RefreshScreens();
            }
            else if (currentScenarioType == ScenarioType.FREE)
            {
                Camera.main.gameObject.transform.LookAt(GameObject.Find("mixamorig:Head").transform);
            }

            randomizeFlag = true;
        }
        else
        {
            Debug.Log("Wrong agent id to change into!");
        }
    }