示例#1
0
    void Awake()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
            return;
        }

        Instance = this;
        _anim    = gameObject.GetComponent <Animator>();
        _audio   = GetComponent <AudioSource>();
    }
示例#2
0
    void Awake()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
            return;
        }

        Instance = this;
        _anim = gameObject.GetComponent<Animator>();
        _audio = GetComponent<AudioSource>();
    }