示例#1
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="device"></param>
 /// <param name="filename">ファイルパス</param>
 /// <param name="resourceManager">リソースマネージャー</param>
 public PictureObject(PPDDevice device, Resource.ResourceManager resourceManager, PathObject filename)
     : this(device, resourceManager, filename, false)
 {
 }
示例#2
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="device"></param>
 /// <param name="filename">エフェクトパス</param>
 /// <param name="resourceManager">リソースマネージャー</param>
 public EffectObject(PPDDevice device, Resource.ResourceManager resourceManager, PathObject filename) : base(device)
 {
     this.resourceManager = resourceManager;
     manager = EffectLoader.Load(filename, LoadFunc);
     if (manager == null)
     {
         MessageBox.Show("Failed to load effect:" + filename);
         return;
     }
     manager.Finish += manager_Finish;
     Alignment       = EffectAlignment.Center;
     PlayType        = EffectManager.PlayType.Once;
 }
示例#3
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="device"></param>
 /// <param name="filename">ファイルパス</param>
 /// <param name="center">センタリングするか</param>
 /// <param name="resourceManager">リソースマネージャー</param>
 public PictureObject(PPDDevice device, Resource.ResourceManager resourceManager, PathObject filename, bool center) : base(device)
 {
     imageResource = resourceManager.GetResource <ImageResourceBase>(filename);
     if (imageResource == null)
     {
         imageResource = (ImageResourceBase)resourceManager.Add(filename, ImageResourceFactoryManager.Factory.Create(device, filename, false));
     }
     if (center)
     {
         RotationCenter = ScaleCenter = new Vector2(imageResource.Width / 2, imageResource.Height / 2);
         Offset         = new Vector2(-imageResource.Width / 2, -imageResource.Height / 2);
     }
     this.center = center;
     rec         = new RectangleF(0, 0, imageResource.Width, imageResource.Height);
 }
示例#4
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="device"></param>
 /// <param name="filename">ファイルパス</param>
 /// <param name="resourceManager">リソースクラス</param>
 public NumberPictureObject(PPDDevice device, Resource.ResourceManager resourceManager, PathObject filename) : base(device)
 {
     imageResource = resourceManager.GetResource <ImageResourceBase>(filename);
     if (imageResource == null)
     {
         imageResource = (ImageResourceBase)resourceManager.Add(filename, ImageResourceFactoryManager.Factory.Create(device, filename, false));
     }
     UpdateResource();
 }