public override void Update(float dt) { elapsed += dt; if (elapsed > 1f) { elapsed = 0f; // CCLabelBMFont if (label1 != null) { RemoveChild(label1); } CCNode node = new CCNode(); CCSize s = CCDirector.SharedDirector.WinSize; float x = s.Width * CCMacros.CCRandomBetween0And1(); float y = s.Height * CCMacros.CCRandomBetween0And1(); label1 = new CCLabelBMFont(string.Format("{0:N2},{1:N2} @ Mem Leak Ctor", x, y), "fonts/konqa32.fnt", 255f, CCTextAlignment.Right, CCPoint.Zero); node.AddChild(label1); label1.Position = new CCPoint(x, y); AddChild(node); label1 = node; // Start - test case for memory leak mentioned at https://cocos2dxna.codeplex.com/discussions/544032 node.Scale = 2f; //--> This action causes the leak CCScaleTo acScale = new CCScaleTo(0.1f, 1); CCDelayTime acShow = new CCDelayTime(0.1f); CCSplitRows acFadeOut = new CCSplitRows(0.1f, 20); CCRemoveSelf acRemove = new CCRemoveSelf(true); CCSequence seq = new CCSequence(acScale, acShow, acFadeOut, acRemove); node.RunAction(seq); } }
public override object Copy(ICopyable pZone) { CCSplitRows pCopy; if (pZone != null) { pCopy = (CCSplitRows) (pZone); } else { pCopy = new CCSplitRows(); pZone = (pCopy); } base.Copy(pZone); pCopy.InitWithRows(m_nRows, m_fDuration); return pCopy; }
public override object Copy(ICopyable pZone) { CCSplitRows pCopy; if (pZone != null) { pCopy = (CCSplitRows)(pZone); } else { pCopy = new CCSplitRows(); pZone = (pCopy); } base.Copy(pZone); pCopy.InitWithRows(m_nRows, m_fDuration); return(pCopy); }
public CCSplitRowsState(CCSplitRows action, CCNodeGrid target) : base(action, target) { VisibleSize = Target.VisibleBoundsWorldspace.Size; width = VisibleSize.Width; }
public new static CCActionInterval actionWithDuration(float t) { return(CCSplitRows.actionWithRows(9, t)); }
public CCSplitRowsState (CCSplitRows action, CCNode target) : base (action, target) { VisibleBounds = Target.Layer.VisibleBoundsWorldspace; }
public CCSplitRowsState (CCSplitRows action, CCNodeGrid target) : base (action, target) { VisibleSize = Target.VisibleBoundsWorldspace.Size; width = VisibleSize.Width; }
/// <summary> /// creates the action with the number of rows to split and the duration /// </summary> public static CCSplitRows Create(int nRows, float duration) { var pAction = new CCSplitRows(); pAction.InitWithRows(nRows, duration); return pAction; }
public CCSplitRowsState(CCSplitRows action, CCNode target) : base(action, target) { VisibleBounds = Target.Layer.VisibleBoundsWorldspace; }