public virtual bool Init() { // scenes m_pRunningScene = null; m_pNextScene = null; m_pNotificationNode = null; m_dOldAnimationInterval = m_dAnimationInterval = 1.0 / kDefaultFPS; // Set default projection (3D) m_eProjection = CCDirectorProjection.Default; // projection delegate if "Custom" projection is used m_pProjectionDelegate = null; // FPS m_fAccumDt = 0.0f; m_fFrameRate = 0.0f; m_pFPSLabel = null; m_pSPFLabel = null; m_pDrawsLabel = null; m_bDisplayStats = false; m_uTotalFrames = m_uFrames = 0; // paused ? m_bPaused = false; // purge ? m_bPurgeDirecotorInNextLoop = false; m_obWinSizeInPixels = m_obWinSizeInPoints = CCSize.Zero; //m_pobOpenGLView = null; m_fContentScaleFactor = 1.0f; // scheduler m_pScheduler = new CCScheduler(); // action manager m_pActionManager = new CCActionManager(); m_pScheduler.ScheduleUpdateForTarget(m_pActionManager, CCScheduler.kCCPrioritySystem, false); // touchDispatcher m_pTouchDispatcher = new CCTouchDispatcher(); m_pTouchDispatcher.Init(); // KeypadDispatcher m_pKeypadDispatcher = new CCKeypadDispatcher(); // Accelerometer #if !PSM && !NETFX_CORE m_pAccelerometer = new CCAccelerometer(); #endif // create autorelease pool //CCPoolManager::sharedPoolManager()->push(); m_NeedsInit = false; return(true); }
public CCTimer(CCScheduler scheduler, SelectorProtocol target, SEL_SCHEDULE selector, float seconds, uint repeat, float delay) { _scheduler = scheduler; Target = target; Selector = selector; Elapsed = -1; OriginalInterval = seconds; Interval = seconds; m_fDelay = delay; m_bUseDelay = delay > 0f; m_nRepeat = repeat; m_bRunForever = m_nRepeat == uint.MaxValue; }
public CCTimer(CCScheduler scheduler, ICCSelectorProtocol target, Action<float> selector, float seconds, uint repeat, float delay) { _scheduler = scheduler; m_pTarget = target; Selector = selector; m_fElapsed = -1; OriginalInterval = seconds; Interval = seconds; m_fDelay = delay; m_bUseDelay = delay > 0f; m_uRepeat = repeat; m_bRunForever = m_uRepeat == uint.MaxValue; }
public CCTimer(CCScheduler scheduler, ICCSelectorProtocol target, Action <float> selector, float seconds, uint repeat, float delay) { _scheduler = scheduler; m_pTarget = target; Selector = selector; m_fElapsed = -1; OriginalInterval = seconds; Interval = seconds; m_fDelay = delay; m_bUseDelay = delay > 0f; m_uRepeat = repeat; m_bRunForever = (m_uRepeat == CCScheduler.kCCRepeatForever); }
public CCNode() { m_fScaleX = 1.0f; m_fScaleY = 1.0f; m_bVisible = true; m_nTag = kCCNodeTagInvalid; m_sTransform = CCAffineTransform.Identity; m_bInverseDirty = true; // set default scheduler and actionManager CCDirector director = CCDirector.SharedDirector; m_pActionManager = director.ActionManager; m_pScheduler = director.Scheduler; }
public virtual bool Init() { SetDefaultValues(); // scenes m_pRunningScene = null; m_pNextScene = null; m_pNotificationNode = null; m_dOldAnimationInterval = m_dAnimationInterval = 1.0 / kDefaultFPS; // Set default projection (3D) m_eProjection = CCDirectorProjection.Default; // projection delegate if "Custom" projection is used m_pProjectionDelegate = null; // FPS m_fAccumDt = 0.0f; m_pFPSLabel = null; m_pUpdateTimeLabel = null; m_pDrawTimeLabel = null; m_pDrawsLabel = null; m_bDisplayStats = false; m_uTotalFrames = 0; m_pStopwatch = new Stopwatch(); // paused ? m_bPaused = false; // purge ? m_bPurgeDirecotorInNextLoop = false; m_obWinSizeInPoints = CCSize.Zero; //m_pobOpenGLView = null; m_fContentScaleFactor = 1.0f; // scheduler m_pScheduler = new CCScheduler(); // action manager m_pActionManager = new CCActionManager(); m_pScheduler.ScheduleUpdateForTarget(m_pActionManager, CCScheduler.kCCPrioritySystem, false); // touchDispatcher m_pTouchDispatcher = new CCTouchDispatcher(); m_pTouchDispatcher.Init(); // KeypadDispatcher m_pKeypadDispatcher = new CCKeypadDispatcher(); // KeyboardDispatcher m_pKeyboardDispatcher = new CCKeyboardDispatcher(); // Accelerometer #if !PSM &&!NETFX_CORE m_pAccelerometer = new CCAccelerometer(); #endif // create autorelease pool //CCPoolManager::sharedPoolManager()->push(); m_NeedsInit = false; return true; }
public CCNode() { m_fScaleX = 1.0f; m_fScaleY = 1.0f; m_bIsVisible = true; m_nTag = kCCNodeTagInvalid; m_tTransform = CCAffineTransform.Identity; m_bIsInverseDirty = true; // set default scheduler and actionManager CCDirector director = CCDirector.SharedDirector; m_pActionManager = director.ActionManager; m_pScheduler = director.Scheduler; }
/** Initializes a timer with a target, a selector and an interval in seconds. * Target is not needed in c#, it is just for compatibility. */ public CCTimer(CCScheduler scheduler, ICCSelectorProtocol target, Action<float> selector, float seconds) : this(scheduler, target, selector, seconds, 0, 0) { }
/** Initializes a timer with a target, a selector and an interval in seconds. * Target is not needed in c#, it is just for compatibility. */ public CCTimer(CCScheduler scheduler, SelectorProtocol target, SEL_SCHEDULE selector, float seconds) : this(scheduler, target, selector, seconds, 0, 0) { }
/** Initializes a timer with a target, a selector and an interval in seconds. * Target is not needed in c#, it is just for compatibility. */ public CCTimer(CCScheduler scheduler, ICCSelectorProtocol target, Action <float> selector, float seconds) : this(scheduler, target, selector, seconds, 0, 0) { }