Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conway’s Game Of Live 1 Fall 2014 CS7020: Game Design and Development.

Similar presentations


Presentation on theme: "Conway’s Game Of Live 1 Fall 2014 CS7020: Game Design and Development."— Presentation transcript:

1 Conway’s Game Of Live 1 Fall 2014 CS7020: Game Design and Development

2 Model—View—Controller  Model: – The model contains classes that represent the data used by the application. This will also include methods for manipulating and computing with that data.  View: – The view is what the user sees. This is the visible interface.  Controller: – The controller contains code that is executed in response to user actions and some other external events. 2 Fall 2014 CS7020: Game Design and Development

3 Callback Interface  Callback interface us used for Fragment to Fragment communication in android.  Handler class can be used to register to a thread and provides a simple channel to send data to this thread. – A Handler object registers itself with the thread in which it is created. For example, if you create a new instance of the Handler class in the onCreate() method of your activity, the resulting Handler object can be used to post data to the main thread. – counterHandler = new Handler(counterCallback); – counterHandler.sendEmptyMessage(0); 3 Fall 2014 CS7020: Game Design and Development

4 Invalidate  postInvalidate, – invalidate a View from non-UI threads  invalidate – Invalidate a View from main UI-thread 4 Fall 2014 CS7020: Game Design and Development

5 TimerTask  TimerTask is a task that can be scheduled for one-time or repeated execution by a Timer. //schedule the timer, after the first 0ms the timerTask will run every 500ms timer.schedule(timerTask, 0, 500); 5 Fall 2014 CS7020: Game Design and Development


Download ppt "Conway’s Game Of Live 1 Fall 2014 CS7020: Game Design and Development."

Similar presentations


Ads by Google