示例#1
0
    void Awake()
    {
        _audioSource = GetComponent <AudioSource>();
        scriptHolder = GameObject.Find("ScriptHolder");
        pw           = scriptHolder.GetComponent <PowerSwipe1>();

        if (instance != this && instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        explosion = GameObject.Find("Explosion");
    }
示例#2
0
    void Awake()
    {
        _audioSource = GetComponent<AudioSource>();
        scriptHolder = GameObject.Find("ScriptHolder");
        pw = scriptHolder.GetComponent<PowerSwipe1>();

        if (instance != this && instance == null)
        {
            instance = this;
        }
        else Destroy(gameObject);

        explosion = GameObject.Find("Explosion");
    }