Example #1
0
 public void ClearCSFromRecordPlayer()
 {
     if (cs != null)
     {
         cs.ClearPassportScreen();
     }
 }
    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!");
        }
    }