示例#1
0
        internal void LoadContent( ResourceManager resourceManager )
        {
            if ( null == resourceManager )
                return;

            foreach ( Resource resource in resourceManager.Resources )
                if ( resource.Type == ResourceType.Sound )
                    this.sounds.Add ( resource.Name, resourceManager.GetSound ( resource.Name ) );
                else if ( resource.Type == ResourceType.Music )
                    this.music.Add ( resource.Name, resourceManager.GetMusic ( resource.Name ) );
        }
示例#2
0
文件: Scene.cs 项目: Otto404/wp-xna
        protected Scene( Vector2 location, GestureType gestureType, IList<Resource> resources, IList<Making> makings, bool isBroken, bool isBackgroundMusicLoop )
        {
            this.Location = location;
            this.GestureType = gestureType;

            this.resourceManager = new ResourceManager ( resources );
            this.audioManager = new AudioManager ( );

            if ( null != makings )
                foreach ( Making making in makings )
                    if ( null != making )
                        this.makings.Add ( making.Name, making );

            foreach ( Making making in this.makings.Values )
                making.Init ( this );

            this.IsBroken = isBroken;
            this.isBackgroundMusicLoop = isBackgroundMusicLoop;
        }
示例#3
0
文件: Button.cs 项目: Otto404/wp-xna
        internal override void InitResource( ResourceManager resourceManager )
        {
            base.InitResource ( resourceManager );

            this.backgroundMovie.InitResource ( resourceManager );
        }
示例#4
0
文件: Shape.cs 项目: Otto404/wp-xna
 internal override void InitResource( ResourceManager resourceManager )
 {
     this.Texture = resourceManager.GetTexture ( this.resourceName );
 }
示例#5
0
文件: Label.cs 项目: Otto404/wp-xna
 internal override void InitResource( ResourceManager resourceManager )
 {
     this.font = resourceManager.GetFont ( this.resourceName );
 }
示例#6
0
文件: Making.cs 项目: Otto404/wp-xna
 internal virtual void InitResource( ResourceManager resourceManager )
 {
 }