void Awake()
 {
     if (!instance)
     {
         instance = this;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Constructeur
        /// </summary>
        /// <param name="context">Le modèle du jeu</param>
        public StartState(Models.Game context)
        {
            this.context = context;
            this.ball    = context.Ball;
            this.bar     = context.Bar;

            bar.SetPosition((context.Size.Width / 2) - (bar.Size.Width / 4), bar.Position.Y);
            this.context.Bricks = BrickCreator.NextSchema();
            context.Refresh();
        }
Beispiel #3
0
 /// <summary>
 /// Met à jour
 /// </summary>
 public void Update()
 {
     BrickCreator.ResetSchemeCounter();
     context.State  = new StartState(context);
     context.Points = 0;
 }
Beispiel #4
0
 void Start()
 {
     br = this;
 }