Exemplo n.º 1
0
    public void FlushAlivePlayerInputs()
    {
        foreach (GameObject pg in m_Players)
        {
            if (pg != null)
            {
                IPlatformer2DUserControl controls = pg.GetComponent <IPlatformer2DUserControl>();
                if (controls != null)
                {
                    controls.FlushInputs();
                }

                PlatformerCharacter2D charac = pg.GetComponent <PlatformerCharacter2D>();
                if (charac != null)
                {
                    charac.FlushAnimState();
                }

                DelayManager dm = pg.GetComponent <DelayManager>();
                if (dm != null)
                {
                    dm.AddDelay(Database.instance.MenuInputDelay);
                    dm.AddShieldDelay(Database.instance.MenuInputDelay);
                }
            }
        }
    }