Exemplo n.º 1
0
    public void Magnetise(int index, int x, int y)
    {
        S_Slider slider = gameObject.AddComponent <S_Slider>();
        int      dx     = (int)(transform.position.x - transform.position.x);
        int      dy     = (int)(transform.position.y - transform.position.y);
        int      dist   = dx * dx + dy * dy;

        Game.Lock();
        slider.SlideTo(x, y, index / 20f, Interpolation.InterpolationType.Pow2In, () => { Pickup(); Game.Unlock(); });
    }
Exemplo n.º 2
0
    void Fire()
    {
        if (Game.Get().state != Game.GameState.NextLevel)
        {
            return;
        }
        Sounds.PlaySound(Sounds.shoot);
        S_Slider slider = gameObject.AddComponent <S_Slider>();

        Game.Lock();
        ClearTargets();
        slider.SlideTo((int)Level.Get(gameObject).player.transform.position.x, (int)Level.Get(gameObject).player.transform.position.y, .25f, Interpolation.InterpolationType.Pow2In, () => {
            if (Game.IsCurrent(gameObject))
            {
                Game.Get().Lose();
                Game.Unlock();
            }
        });
    }
Exemplo n.º 3
0
 public void SlideIn()
 {
     slider.SetPosition(Screen.width, 0);
     slider.SlideTo(0, 0, .3f);
 }