Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (update)
        {
            if (timer > 0.5f)
            {
                timer = 0;
                a.Atk(b);
                b.Atk(a);

                if (a.die || b.die)
                {
                    update = false;
                }
            }
            else
            {
                timer += Time.deltaTime;
            }
        }
    }