コード例 #1
0
    private IEnumerator FollowTarget()
    {
        WaitForSeconds gap = new WaitForSeconds(.5f);

        while (true)
        {
            yield return(gap);

            if (mPlayer != null && mPlayer.gameObject.activeInHierarchy)
            {
                mBolt.SetTarget(mPlayer.transform.position);
            }
        }
    }