コード例 #1
0
    public override void OnShow()
    {
        CaseData     caseData     = CaseManager.Instance.CurrentCaseData;
        CaseProgress caseProgress = CaseManager.Instance.CurrentCaseProgress;

        InitDeathLocation(caseData, caseProgress);
        InitMurderWeapon(caseData, caseProgress);
    }
コード例 #2
0
    protected override void Init()
    {
        // only one case for the demo, so just hardcode load it
        m_CurrentCaseData = Resources.Load <CaseData>("Data/Case/CaseData1");
        Debug.AssertFormat(m_CurrentCaseData != null, this, "CaseManager could not find CaseData at Resources/Data/Case/CaseData1.");

        m_CurrentCaseProgress = new CaseProgress();
    }
コード例 #3
0
 void InitMurderWeapon(CaseData caseData, CaseProgress caseProgress)
 {
     // For now, assume player deductions are perfect and as soon as the murder weapon clue is found,
     // associate it to murder weapon. Later, player will have to set this value manually (and may be wrong).
     if (caseData.murderWeaponClueData != null)
     {
         if (caseProgress.HasFoundClue(caseData.murderWeaponClueData.stringID))
         {
             // clue has been found, show readable name
             murderWeaponValue.text = caseData.murderWeaponClueData.clueName;
         }
     }
     else
     {
         murderWeaponValue.text = "N/A";
     }
 }
コード例 #4
0
 void InitDeathLocation(CaseData caseData, CaseProgress caseProgress)
 {
     // For now, assume player deductions are perfect and as soon as the death location scene is found,
     // associate it to death location. Later, player will have to set this value manually (and may be wrong).
     if (caseData.deathLocationSceneData != null)
     {
         if (caseProgress.HasUnlockedScene(CaseSceneType.Real, caseData.deathLocationSceneData.sceneEnum) ||
             caseProgress.HasUnlockedScene(CaseSceneType.Reconstruction, caseData.deathLocationSceneData.sceneEnum))
         {
             // scene has been unlocked, show readable name
             deathLocationValue.text = caseData.deathLocationSceneData.sceneName;
         }
     }
     else
     {
         deathLocationValue.text = "N/A";
     }
 }