public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCGridAction pCopy = null; if (pZone != null && pZone.m_pCopyObject != null) { //in case of being called at sub class pCopy = (CCGridAction)(pZone.m_pCopyObject); } else { pCopy = new CCGridAction(); pZone = pNewZone = new CCZone(pCopy); } base.copyWithZone(pZone); pCopy.initWithSize(m_sGridSize, Duration); if (pNewZone != null) { pNewZone = null; } return pCopy; }
public override CCObject copyWithZone(CCZone pZone) { CCZone pNewZone = null; CCGridAction pCopy = null; if (pZone != null && pZone.m_pCopyObject != null) { //in case of being called at sub class pCopy = (CCGridAction)(pZone.m_pCopyObject); } else { pCopy = new CCGridAction(); pZone = pNewZone = new CCZone(pCopy); } base.copyWithZone(pZone); pCopy.initWithSize(m_sGridSize, Duration); if (pNewZone != null) { pNewZone = null; } return(pCopy); }
/// <summary> /// creates the action with size and duration /// </summary> public static CCGridAction actionWithSize(ccGridSize gridSize, float duration) { CCGridAction pAction = new CCGridAction(); if (pAction.initWithSize(gridSize, duration)) { return pAction; } return null; }
/// <summary> /// creates the action with size and duration /// </summary> public static CCGridAction actionWithSize(ccGridSize gridSize, float duration) { CCGridAction pAction = new CCGridAction(); if (pAction.initWithSize(gridSize, duration)) { return(pAction); } return(null); }