Example #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)
 {
 }
Example #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;
 }
Example #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);
 }
Example #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();
 }