public override void OnEnter() { base.OnEnter(); alignSpritesLeft(2); // Test: // Sequence should work both with IntervalAction and InstantActions var move1 = new CCMoveBy(1, new CCPoint(250, 0)); var move2 = new CCMoveBy(1, new CCPoint(0, 50)); var tog1 = new CCToggleVisibility(); var tog2 = new CCToggleVisibility(); var seq = CCSequence.FromActions(move1, tog1, move2, tog2, move1.Reverse()); var action = new CCRepeat((CCSequence.FromActions(seq, seq.Reverse())), 3); // Test: // Also test that the reverse of Hide is Show, and vice-versa m_kathia.RunAction(action); var move_tamara = new CCMoveBy(1, new CCPoint(100, 0)); var move_tamara2 = new CCMoveBy(1, new CCPoint(50, 0)); var hide = new CCHide(); var seq_tamara = CCSequence.FromActions(move_tamara, hide, move_tamara2); var seq_back = seq_tamara.Reverse(); m_tamara.RunAction(CCSequence.FromActions(seq_tamara, seq_back)); }
public override void onEnter() { base.onEnter(); alignSpritesLeft(2); // Test: // Sequence should work both with IntervalAction and InstantActions CCActionInterval move1 = CCMoveBy.actionWithDuration(1, new CCPoint(250, 0)); CCActionInterval move2 = CCMoveBy.actionWithDuration(1, new CCPoint(0, 50)); CCToggleVisibility tog1 = new CCToggleVisibility(); CCToggleVisibility tog2 = new CCToggleVisibility(); CCFiniteTimeAction seq = CCSequence.actions(move1, tog1, move2, tog2, move1.reverse()); CCActionInterval action = CCRepeat.actionWithAction((CCActionInterval)(CCSequence.actions(seq, seq.reverse())), 3); // Test: // Also test that the reverse of Hide is Show, and vice-versa m_kathia.runAction(action); CCActionInterval move_tamara = CCMoveBy.actionWithDuration(1, new CCPoint(100, 0)); CCActionInterval move_tamara2 = CCMoveBy.actionWithDuration(1, new CCPoint(50, 0)); CCActionInstant hide = new CCHide(); CCFiniteTimeAction seq_tamara = CCSequence.actions(move_tamara, hide, move_tamara2); CCFiniteTimeAction seq_back = seq_tamara.reverse(); m_tamara.runAction(CCSequence.actions(seq_tamara, seq_back)); }
public override object Copy(ICopyable pZone) { CCHide pRet; if (pZone != null) { pRet = (CCHide)(pZone); } else { pRet = new CCHide(); pZone = (pRet); } base.Copy(pZone); return(pRet); }
public override object Copy(ICopyable pZone) { CCHide pRet; if (pZone != null) { pRet = (CCHide) (pZone); } else { pRet = new CCHide(); pZone = (pRet); } base.Copy(pZone); return pRet; }
public override void OnEnter() { base.OnEnter(); this.TouchEnabled = true; CCSize s = CCDirector.SharedDirector.WinSize; CCLayerColor layer = new CCLayerColor(new CCColor4B(0xFF, 0x00, 0x00, 0x80), s.Width * 0.75f, s.Height * 0.75f); layer.IgnoreAnchorPointForPosition = false; layer.Position = (new CCPoint(s.Width / 2, s.Height / 2)); AddChild(layer, 1, kTagLayer); // // Add two labels using BM label class // CCLabelBMFont CCLabelBMFont label1 = new CCLabelBMFont("LABEL1", "fonts/konqa32.fnt"); layer.AddChild(label1); label1.Position = new CCPoint(layer.ContentSize.Width / 2, layer.ContentSize.Height * 0.75f); CCLabelBMFont label2 = new CCLabelBMFont("LABEL2", "fonts/konqa32.fnt"); layer.AddChild(label2); label2.Position = new CCPoint(layer.ContentSize.Width / 2, layer.ContentSize.Height * 0.25f); // // Do the sequence of actions in the bug report float waitTime = 3f; float runTime = 12f; layer.Visible = false; CCHide hide = new CCHide(); CCScaleTo scaleTo1 = new CCScaleTo(0.0f, 0.0f); CCShow show = new CCShow(); CCDelayTime delay = new CCDelayTime(waitTime); CCScaleTo scaleTo2 = new CCScaleTo(runTime * 0.25f, 1.2f); CCScaleTo scaleTo3 = new CCScaleTo(runTime * 0.25f, 0.95f); CCScaleTo scaleTo4 = new CCScaleTo(runTime * 0.25f, 1.1f); CCScaleTo scaleTo5 = new CCScaleTo(runTime * 0.25f, 1.0f); CCFiniteTimeAction seq = CCSequence.FromActions(hide, scaleTo1, show, delay, scaleTo2, scaleTo3, scaleTo4, scaleTo5); layer.RunAction(seq); }
public override void onEnter() { base.onEnter(); this.isTouchEnabled = true; CCSize s = CCDirector.sharedDirector().getWinSize(); CCLayerColor layer = CCLayerColor.layerWithColorWidthHeight(new ccColor4B(0xFF, 0x00, 0x00, 0x80), s.width * 0.75f, s.height * 0.75f); layer.isRelativeAnchorPoint = true; layer.position = (new CCPoint(s.width / 2, s.height / 2)); addChild(layer, 1, kTagLayer); // // Add two labels using BM label class // CCLabelBMFont CCLabelBMFont label1 = CCLabelBMFont.labelWithString("LABEL1", "fonts/fnt/konqa32"); layer.addChild(label1); label1.position = new CCPoint(layer.contentSize.width / 2, layer.contentSize.height * 0.75f); CCLabelBMFont label2 = CCLabelBMFont.labelWithString("LABEL2", "fonts/fnt/konqa32"); layer.addChild(label2); label2.position = new CCPoint(layer.contentSize.width / 2, layer.contentSize.height * 0.25f); // // Do the sequence of actions in the bug report float waitTime = 3f; float runTime = 12f; layer.visible = false; CCHide hide = CCHide.action(); CCScaleTo scaleTo1 = CCScaleTo.actionWithDuration(0.0f, 0.0f); CCShow show = CCShow.action(); CCDelayTime delay = CCDelayTime.actionWithDuration(waitTime); CCScaleTo scaleTo2 = CCScaleTo.actionWithDuration(runTime * 0.25f, 1.2f); CCScaleTo scaleTo3 = CCScaleTo.actionWithDuration(runTime * 0.25f, 0.95f); CCScaleTo scaleTo4 = CCScaleTo.actionWithDuration(runTime * 0.25f, 1.1f); CCScaleTo scaleTo5 = CCScaleTo.actionWithDuration(runTime * 0.25f, 1.0f); CCFiniteTimeAction seq = CCSequence.actions(hide, scaleTo1, show, delay, scaleTo2, scaleTo3, scaleTo4, scaleTo5); layer.runAction(seq); }
protected CCHide(CCHide hide) : base(hide) { }
public CCHideState(CCHide action, CCNode target) : base(action, target) { target.Visible = false; }
public CCHideState (CCHide action, CCNode target) : base (action, target) { target.Visible = false; }
public static new CCHide Create() { var pRet = new CCHide(); return pRet; }