public CCEventDispatcher(CCGameView gameView) { GameView = gameView; toBeAddedListeners = new List <CCEventListener>(50); listenerMap = new Dictionary <string, CCEventListenerVector>(); priorityDirtyFlagMap = new Dictionary <string, DirtyFlag>(); nodeListenersMap = new Dictionary <CCNode, List <CCEventListener> >(); nodePriorityMap = new Dictionary <CCNode, int>(); globalZOrderNodeMap = new Dictionary <float, List <CCNode> >(); dirtyNodes = new SortedSet <CCNode>(); internalCustomListenerIDs = new SortedSet <string>(); IsEnabled = true; inDispatch = 0; nodePriorityIndex = 0; internalCustomListenerIDs.Add(CCEvent.EVENT_COME_TO_FOREGROUND); internalCustomListenerIDs.Add(CCEvent.EVENT_COME_TO_BACKGROUND); }
public CCAccelerometer(CCGameView gameView) { GameView = gameView; #if IOS accelerometer = new CoreMotion.CMMotionManager(); //accelerometer.AccelerometerUpdateInterval = 60f; #elif !WINDOWS && !OUYA && !NETFX_CORE && !MACOS && !WINDOWSGL && !WINDOWSDX try { accelerometer = new Accelerometer(); } catch (Exception ex) { CCLog.Log(ex.ToString()); CCLog.Log("No accelerometer on platform. CCAccelerometer will default to emulation code."); } #elif NETFX_CORE accelerometer = Accelerometer.GetDefault(); #endif }
public CCAndroidScreenReceiver(CCGameView view) { gameView = view; }
public CCScene(CCGameView gameView) { GameView = gameView; }