Inheritance: DefineView
Ejemplo n.º 1
0
        public Graphic(DefineGraphic define){
			_define = define;
			if(_define.className != null)
				_view = new CCSprite(string.Format("{0}_{1}.png", define.flash.prefix, _define.className));
			else
				_view = new CCSprite(string.Format("{0}_ID{1}.png", define.flash.prefix, _define.characterId));
			_view.cascadeColorEnabled = true;
			_view.cascadeOpacityEnabled = true;
			_view.anchorPoint = _define.anchorPoint;
			_view.gameObject.name = define.characterId.ToString();
			_view.opacityModifyRGB = false;
        }
Ejemplo n.º 2
0
		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 Graphic createGraphic(DefineGraphic define){
			return new BBFlashGraphic (define);
		}
Ejemplo n.º 4
0
		public BBFlashGraphic(DefineGraphic define):base(define){
		}