Ejemplo n.º 1
0
 void Start()
 {
     tool = ToolMGR.GetInstance().gameObject;
     EvidenceManager.GetInstance().AddObjectEvent += ShowDescribe;
     EvidenceManager.GetInstance().AddWordEvent   += ShowDescribe;
     evidences = EvidenceManager.GetInstance().allEvidences;
 }
Ejemplo n.º 2
0
 public override void OnDrag(PointerEventData eventData)
 {
     if (usable)
     {
         return;
     }
     canvasGroup.blocksRaycasts = false;
     front.transform.localScale = new Vector3(1f, 1f, 1f);
     front.transform.SetParent(EvidenceManager.GetInstance().transform);
     front.transform.position = Input.mousePosition;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 改变现在工具的内容
 /// </summary>
 /// <param name="toolName"></param>
 public void ChangeTool(string toolName)
 {
     if (toolName.Equals(currentTool))
     {
         CancleTool(currentTool);
     }
     else
     {
         AllEvidence evidence = EvidenceManager.GetInstance().allEvidences;
         currentTool      = toolName;
         toolImage.sprite = evidence.GetObjectEvidence(toolName).GetSprite();
     }
 }
Ejemplo n.º 4
0
    protected override void ToPackage()
    {
        EvidenceManager evidence = EvidenceManager.GetInstance();

        if (evidence.package.GetEvidence(objectName) == null)
        {
            evidence.AddObjectEvidence(objectName);
        }
        else
        {
            DiaLogManager.GetInstance().BoringSpeak(0);
        }
    }
Ejemplo n.º 5
0
    private void Awake()
    {
        //��ʼ������
        antor   = gameObject.GetComponent <Animator>();
        slots   = GetComponentsInChildren <PackageSlot>();
        eviMgr  = EvidenceManager.GetInstance();
        package = eviMgr.package;

        //��ʼ��UI
        ResetPackage();

        //��������ɾ����Ʒ�¼�
        eviMgr.AddObjectEvent    += new EvidenceManager.EvidenceHandler(AddEvidence);
        eviMgr.RemoveObjectEvent += new EvidenceManager.EvidenceHandler(RemoveEvidence);
    }
Ejemplo n.º 6
0
    public override bool AddEvidence(string evidence)
    {
        WordEvidence target = EvidenceManager.GetInstance().allEvidences.GetWordEvidence(evidence);

        for (int i = 0; i < 12; i++)
        {
            if (evidenceList[i] == null)
            {
                evidenceList[i] = target;
                break;
            }
            else if (evidenceList[i].GetEvidenceName().Equals(evidence))
            {
                return(false);
            }
        }
        return(true);
    }
Ejemplo n.º 7
0
    /// <summary>
    /// ��������֮�������
    /// </summary>
    /// <param name="slot"></param>
    private void SwitchSlot(PackageSlot slot)
    {
        ObjectEvidence tem   = slot.evidence;
        int            other = slot.id;

        if (other == id)
        {
            return;
        }
        slot.SetEvidence(evidence);
        if (tem == null)
        {
            Clear();
        }
        else
        {
            SetEvidence(tem);
        }
        EvidenceManager.GetInstance().package.SwitchEvidence(other, id);
        ReturnSlot();
    }
Ejemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     EvidenceManager.GetInstance().AddObjectEvidence("尺寸不一的衣服");
 }
Ejemplo n.º 9
0
 private void OnDestroy()
 {
     EvidenceManager.GetInstance().AddObjectEvent -= ShowDescribe;
     EvidenceManager.GetInstance().AddWordEvent   -= ShowDescribe;
 }
Ejemplo n.º 10
0
    protected override void ToPackage()
    {
        EvidenceManager eviMGR = EvidenceManager.GetInstance();

        eviMGR.AddObjectEvidence(objectName);
    }
Ejemplo n.º 11
0
 void Start()
 {
     EvidenceManager.GetInstance().RemoveObjectEvent += CancleTool;
 }
Ejemplo n.º 12
0
    /// <summary>
    /// 开启情节
    /// </summary>
    /// <param name="plot"></param>
    public void StartPlot(PlotEvent plot)
    {
        switch ((int)plot)
        {
        case -3:
        {
            VSF();
            break;
        }

        case -1: break;

        case -2:
        {
            tool.SetActive(true);
            VS();
            break;
        }

        case 0:
        {
            Cursor.visible = true;
            tool.SetActive(true);
            GameStart();
            break;
        }

        case 1:
        {
            LateToMeet();
            break;
        }

        case 2:
        {
            EvidenceManager.GetInstance().AddObjectEvidence("白酒");
            break;
        }

        case 3:
        {
            evidenceManager.RemoveObjectEvidence("白酒");
            evidenceManager.AddObjectEvidence("新酒");
            GetWine();
            break;
        }

        case 4:
        {
            tool.SetActive(true);
            player.transform.localScale = new Vector3(0.2f, 0.2f);
            PlayerControl.GetInstance().EnableMove();
            break;
        }

        case 5:
        {
            EvidenceManager.GetInstance().RemoveObjectEvidence("新酒");
            FinishTur();
            break;
        }

        case 6:
        {
            BossIntro();
            break;
        }

        case 7:
        {
            Cursor.visible = false;
            PlayerControl.GetInstance().Pause();
            StartSpeaking("进入书架");
            break;
        }

        case 8:
        {
            EnterScene();
            break;
        }

        case 9:
        {
            ExitBookShell();
            break;
        }

        case 10:
        {
            StartPlot(PlotEvent.GAME_START);
            EndShellPuzzel();
            break;
        }

        case 11:
        {
            StartPlot(PlotEvent.GAME_START);
            FailedShellPuzzel();
            break;
        }
        }
    }
Ejemplo n.º 13
0
 void Start()
 {
     player          = PlayerControl.GetInstance().gameObject.GetComponent <Player>();
     evidenceManager = EvidenceManager.GetInstance();
     tool            = ToolMGR.GetInstance().gameObject;
 }
Ejemplo n.º 14
0
    private void ShowDescribe(string str)
    {
        ObjectEvidence evi = EvidenceManager.GetInstance().allEvidences.GetObjectEvidence(str);

        text.text = evi.GetDescribe();
    }