Пример #1
0
    public void triggerRight()
    {
        if (location.x < limit.x - 1 && rightDelay.trigger())
        {
            location = location + new Vector2(1, 0);
//			dropDelay.reset ();
        }
    }
Пример #2
0
    public void triggerLeft()
    {
        if (location.x > 0 && leftDelay.trigger())
        {
            location = location - new Vector2(1, 0);
//			dropDelay.reset ();
        }
    }
Пример #3
0
    public void triggerUp()
    {
        if (location.y < limit.y - 1 && upDelay.trigger())
        {
            location = location + new Vector2(0, 1);
//			dropDelay.reset ();
        }
    }
Пример #4
0
    public void triggerDown()
    {
        if (location.y > 0 && downDelay.trigger())
        {
            location = location - new Vector2(0, 1);
//			dropDelay.reset ();
        }
    }
Пример #5
0
    public Emission Emit()
    {
        Emission returnedEmission = null;

        if (emissionDelay.trigger())
        {
            returnedEmission = new Emission(getLocation(), limit, getRandomDirection());
        }
        return(returnedEmission);
    }
Пример #6
0
    public DropData triggerDrop()
    {
        DropData dd = null;

        if (dropDelay.trigger())
        {
            dd = new DropData(location, takeNextDrop());
            playerUI.UpdateNextDrops(nextDropType);
        }
        return(dd);
    }