Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        audioManager = FindObjectOfType <AudioManager>();

        nextShape = FindObjectOfType <NextShape>();

        int rand = Random.Range(0, groups.Length);

        nextTetromino = groups[rand];
        nextShape.UpdateShape(rand);

        spawnNext(Face.FRONT);

        audioManager.Play("theme");
    }
Exemple #2
0
 public InstanceManager(Form1 form)
 {
     grabForm     = form;
     sound        = new SFX();
     rand         = new Random();
     predict      = new Prediction();
     rowCheck     = new RowCheck();
     gamepad      = new GamepadSupport();
     rotate       = new Rotate();
     nextShape    = new NextShape();
     move         = new Move();
     rotCheck     = new RotateCheck();
     ply          = new Player();
     gameSettings = new GameSettings();
     getGameGraphics();
 }
Exemple #3
0
 private Classic(
     NextShape generator,
     TimeSpan time,
     Field field,
     Blocks blocks,
     Shape current,
     Shape next,
     long score,
     int level,
     int moves)
 {
     rnd     = generator;
     Time    = time;
     Field   = field;
     Blocks  = blocks;
     Current = current;
     Next    = next;
     Score   = score;
     Level   = level;
     Moves   = moves;
 }