示例#1
0
    private void Awake()
    {
        if (instance != null)
        {
            if (instance != this)
            {
                DestroyImmediate(gameObject);
                return;
            }
        }

        instance = this;
    }
示例#2
0
    private void Update()
    {
        if (distanceFromFlautist < GameManager.Instance.playerRange && !follow)
        {
            loopsfx.enabled = true;

            if (Input.GetMouseButtonDown(1))
            {
                follow = true;
                target = playerTransform;
                EnchantingSfxPool.PlaySfxOnPosition(transform.position);
            }
        }
    }