예제 #1
0
    public void DestroyIt()
    {
        BiteSystem biteSystem = FindObjectOfType <BiteSystem>();

        biteSystem.OnBiteStartEvent -= OnBiteStart;
        biteSystem.OnBiteEndEvent   -= OnBiteEnd;
        GameObject.Destroy(this.gameObject);
    }
예제 #2
0
    void Start()
    {
        this.animator = GetComponent <Animator>();
        BiteSystem biteSystem = FindObjectOfType <BiteSystem>();

        biteSystem.OnBiteStartEvent += OnBiteStart;
        biteSystem.OnBiteEndEvent   += OnBiteEnd;
        this.bobberAudioSource       = GetComponent <AudioSource>();
        this.bobberAudioSource.PlayOneShot(this.splashAudioClip);
    }