Esempio n. 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Ghost")
        {
            gt = other.gameObject.GetComponent <Ghost_targeting>();

            gt.bible(buffTime, this.transform);
        }
    }
    bool iestart = false;  /////後で消す必要

    // Start is called before the first frame update
    void Start()
    {
        iestart = false;

        ///キャラクタをそれぞれ取得
        if (pc == null)
        {
            try
            {
                pc = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControl>();
            }
            catch (System.NullReferenceException)
            {
                Debug.Log("プレイヤー未発見" + name);
            }
        }
        if (tf == null)
        {
            try
            {
                tf = GameObject.FindGameObjectWithTag("Thief").GetComponent <Thief>();
            }
            catch (System.NullReferenceException)
            {
                Debug.Log("Thief未発見" + name);
            }
        }
        if (ght == null)
        {
            try
            {
                ght = GameObject.FindGameObjectWithTag("Ghost").GetComponent <Ghost_targeting>();
            }
            catch (System.NullReferenceException)
            {
                Debug.Log("Ghost Dosen't Exist");
                ghostEnable = false;
            }
        }


        if (treasure == null)
        {
            try
            {
                treasure = GameObject.FindGameObjectWithTag("Treasure");
            }
            catch (System.NullReferenceException)
            {
                Debug.Log("宝未指定" + name);
            }
        }
        if (treasure != null)
        {
            try
            {
                swordlight = treasure.GetComponentInChildren <ParticleSystem>(true);
            }
            catch (System.NullReferenceException)
            {
                Debug.Log("");
            }
        }
        if (ght)
        {
            ghostEnable = ght.gameObject.activeSelf;
        }
        st          = GetComponent <StopSystem>();
        IfGameStart = false;
        text.text   = "";
        GimmickManager.Instance.GimmickFrag = false;
        playStartCount();
        //StartCoroutine(startCount(startWait));
    }