public override void unselected()
 {
     // subclass to change the default action
     if (_isEnabled)
     {
         base.unselected();
         this.stopActionByTag(kCCZoomActionTag);
         CCAction zoomAction = new CCScaleTo(0.1f, _originalScale);
         zoomAction.tag = kCCZoomActionTag;
         runAction(zoomAction);
     }
 }
        public override void selected()
        {
            // subclass to change the default action
            if (_isEnabled)
            {
                base.selected();

                CCAction action = getActionByTag(kCCZoomActionTag);
                if (action != null)
                {
                    stopAction(action);
                }
                else
                {
                    _originalScale = this.scale;
                }

                CCAction zoomAction = new CCScaleTo(0.1f, _originalScale * 1.2f);
                zoomAction.tag = kCCZoomActionTag;
                runAction(zoomAction);
            }
        }
Пример #3
0
        protected override CCAction copyImpl()
        {
            CCScaleTo act = new CCScaleTo(this.duration, _endScaleX, _endScaleY);

            return(act);
        }