Example #1
0
    public static BubbleAnimate SpawnBubble(Bubble type, Vector2 position, float duration)
    {
        BubbleAnimate new_bubble = Instantiate(
            m_bubbles[(int)type], position, new Quaternion());

        Destroy(new_bubble.gameObject, duration);

        return(new_bubble);
    }
Example #2
0
    public void BeginStun()
    {
        current_stun_time = total_stun_time;

        keep_dish_after_stun = false;
        stun_button_counter  = 0;

        bubble = BubbleManager.SpawnBubble(BubbleManager.Bubble.pushB,
                                           new Vector2(transform.position.x + 0.5f, transform.position.y + 0.3f),
                                           current_stun_time);

        StartCoroutine(TryToKeepDish(current_stun_time));
    }