Inheritance: DefineView
Example #1
0
		public Movie(DefineMovie define){
			_view = new CCNodeRGBA ();
			_view.cascadeColorEnabled = true;
			_view.cascadeOpacityEnabled = true;
			_view.gameObject.name = define.characterId.ToString();
			_depth_displays = new DisplayObject[define.maxDepth + 1];
			_depth_displayCaches = new List<DisplayObject>[define.maxDepth + 1];
			_define = define;
			_currentFrame = -1;
			_isBoundsDirty = true;
			_tweenMode = kTweenMode.SkipNoLabelFrames;
		}
		public static Define ParseDefine(Flash flash, byte[] data, Cursor cursor){
			//find nextIndex
			int dataLength = Utils.ReadInt32 (data, cursor);
			int nextIndex = cursor.index + dataLength;
			
			//parse
			byte type = Utils.ReadByte(data, cursor);
			Define def = null;
			if(type==Define.DEF_TYPE_GRAPHIC){
				def = new DefineGraphic().init(flash, data, cursor);
			}else if(type==Define.DEF_TYPE_SPRITE){
				def = new DefineMovie().init(flash, data, cursor);
			}else if(type==Define.DEF_TYPE_SOUND){
				//				def = new BBFlashGraphicDefinition().init(data, tmpcursor.index);
			}else if(type==Define.DEF_TYPE_TEXT){
				//				def = new BBFlashGraphicDefinition().init(data, tmpcursor.index);
			}
			
			
			//nextIndex
			cursor.index = nextIndex;
			
			return def;
		}
		public BBFlashMovieImp(DefineMovie define):base(define){
			_frameEventMode = kFrameEventMode.LabelFrame;
		}
		public Movie createMovie(DefineMovie define){
			return new BBFlashMovieImp (define);
		}
Example #5
0
		public MovieImp(DefineMovie define) : base(define){
			_startFrame = 0;
			_endFrame = _define.frames.Length - 1;
			_loop = true;
			_fps = define.flash.frameRate;
			_action = null;
		}