Beispiel #1
0
    // Use this for initialization
    void Awake()
    {
        gui = GetComponent <PlayerGUI>();

        buttons[0] = b1;
        buttons[1] = b2;
        buttons[2] = b3;
        buttons[3] = b4;

        Debug.Log("Instantiating Hacks");

        PointControl   points  = player.GetComponent <PointControl>();
        PlayerMovement control = player.GetComponent <PlayerMovement>();

        hacks[4] = new flip(points);
        hacks[5] = new freeze(points);
        hacks[6] = new reverse(points);
        hacks[0] = new dropPoint(points);
        hacks[1] = new slowDown(points);
        hacks[2] = new Delay(points);
        hacks[7] = new Kill(points, sb, fire);
        hacks[3] = new Stuck(points);
        reset    = new Reset(control);
    }
Beispiel #2
0
    public void reset_player_right()
    {
        transform.position   = new Vector3(15, 0, 0);
        transform.localScale = new Vector2(0.2f, 0.2f);
        mana = (int)ManaStrip.maxValue;

        sizeShrink ss = GetComponent <sizeShrink>();

        if (ss != null)
        {
            ss.nextCast1 = 0;
            ss.nextCast2 = 0;
            ss.nextCast3 = 0;
        }
        doorMove dm = GetComponent <doorMove>();

        if (dm != null)
        {
            dm.nextCast1 = 0;
            dm.nextCast2 = 0;
            dm.nextCast3 = 0;
        }
        freeze f = GetComponent <freeze>();

        if (f != null)
        {
            f.nextCast1 = 0;
            f.nextCast2 = 0;
            f.nextCast3 = 0;
        }
        XMark x = GetComponent <XMark>();

        if (x != null)
        {
            x.nextCast1 = 0;
            x.nextCast2 = 0;
            x.nextCast3 = 0;
        }
        evolve e = GetComponent <evolve>();

        if (e != null)
        {
            e.nextCast1 = 0;
            e.nextCast2 = 0;
            e.nextCast3 = 0;
        }
        teleport t = GetComponent <teleport>();

        if (t != null)
        {
            t.nextCast1 = 0;
            t.nextCast2 = 0;
            t.nextCast3 = 0;
        }
        fireWall fw = GetComponent <fireWall>();

        if (fw != null)
        {
            fw.nextCast1 = 0;
            fw.nextCast2 = 0;
            fw.nextCast3 = 0;
        }
    }