Exemplo n.º 1
0
    public void RemoveBoulderAnimation(Vector3Int cellBoulderRemoved)
    {
        GameObject  g  = Instantiate(rockRemoval, cellToworld(cellBoulderRemoved), Quaternion.identity);
        FrameLooper fL = g.GetComponent <FrameLooper>();

        fL.PlayOneShotAnimation();
        fL.onPlayOneShotAnimation.RemoveAllListeners();
        fL.onPlayOneShotAnimation.AddListener(() => {
            Destroy(g);
        });
    }
Exemplo n.º 2
0
    public void PlaceBoulderAnimation(Vector3Int cellBoulderDropped)
    {
        //if (AudioManager.instance != null)
        //{
        //    AudioManager.instance.PlayClip(AudioManager.instance.onPlaceBoulder);
        //}
        GameObject  g  = Instantiate(rockFormation, cellToworld(cellBoulderDropped), Quaternion.identity);
        FrameLooper fL = g.GetComponent <FrameLooper>();

        fL.PlayOneShotAnimation();
        fL.onPlayOneShotAnimation.RemoveAllListeners();
        fL.onPlayOneShotAnimation.AddListener(() =>
        {
            Destroy(g);
        });
    }