コード例 #1
0
ファイル: SimulationManager.cs プロジェクト: zyx52387095/Temp
    // Update is called once per frame
    void Update()
    {
        objPatientList = GameObject.FindGameObjectsWithTag("Patient");

        // NULL Check
        if (objPatientList.Length > 0)
        {
            foreach (GameObject goTemp in objPatientList)
            {
                if (goTemp == null)
                {
                    break;
                }

                MySuffererController.ePhase tempPhase =
                    goTemp.GetComponent <MySuffererController>().GetPhase();


                for (int i = 0; i < isOccupy.Length; i++)
                {
                    if (tempPhase == MySuffererController.ePhase.eRoom1 && isOccupy[i] == false)
                    {
                        isOccupy[i] = true;
                        goTemp.GetComponent <MySuffererController>().SetPhase(MySuffererController.ePhase.eRoom2Pre, i);
                        break;
                    }
                }
            }
        }
    }
コード例 #2
0
    //Vector3 bar = default(Vector3)
    public void SetPhase(MySuffererController.ePhase _newPhase, Vector3 v3Destination, int opt)
    {
        if (_newPhase == ePhase.eRoom2Pre)
        {
            wayPointPos      = myWayPointRoom2SE[0].transform.position;
            totalWayPointCnt = myWayPointsRoom2.Length;

            //iMyBedNumber = ( opt != -1) ? opt : 0;
            iMyBedNumber = opt;
        }
        else if (_newPhase == ePhase.eRoom2)
        {
            wayPointPos = v3Destination;
        }
        else if (_newPhase == ePhase.eExit)
        {
            wayPointPos = myWayPointRoom2SE[1].transform.position;
        }
        nowWayPointIdx = 0;
        phase          = _newPhase;
    }
コード例 #3
0
 public void SetPhase(MySuffererController.ePhase _newPhase, Vector3 v3Destination)
 {
     SetPhase(_newPhase, v3Destination, -1);
 }
コード例 #4
0
    public void SetPhase(MySuffererController.ePhase _newPhase, int opt = -1)
    {
        Vector3 tempV3 = new Vector3(0f, 0f, 0f);

        SetPhase(_newPhase, tempV3, opt);
    }