Пример #1
0
 public NoticeImage(Vector2 v2Origin, ItemCodex.ItemTypes enItemType, NoticeImage.ItemNoticeType enNoticeType)
 {
     this.enItemNoticeType = enNoticeType;
     if (enNoticeType == NoticeImage.ItemNoticeType.TreasureChest)
     {
         StaticRenderComponent asd = new StaticRenderComponent();
         this.xTransform = new TransformComponent(v2Origin);
         asd.xTransform = this.xTransform;
         asd.txTexture = ItemCodex.GetItemDescription(enItemType).txDisplayImage;
         asd.v2Offset = Utility.PointToVector2(asd.txTexture);
         asd.fScale = 1f;
         asd.v2OffsetRenderPos = new Vector2(0f, -18f);
         this.iStopFrame = 40;
         this.iFadeFrame = 70;
         this.iFinishFrame = 80;
         this.fMoveSpeed = -0.35f;
         this.xRenderComponent = asd;
         Program.GetTheGame().xRenderMaster.RegisterSortedRenderComponent(this.xRenderComponent);
         return;
     }
     if (enNoticeType == NoticeImage.ItemNoticeType.Digging)
     {
         StaticRenderComponent asd2 = new StaticRenderComponent();
         this.xTransform = new TransformComponent(v2Origin);
         asd2.xTransform = this.xTransform;
         asd2.txTexture = ItemCodex.GetItemDescription(enItemType).txDisplayImage;
         asd2.v2Offset = Utility.PointToVector2(asd2.txTexture);
         asd2.fScale = 1f;
         asd2.v2OffsetRenderPos = new Vector2(0f, -10f);
         this.iFadeInFrame = 40;
         this.iFadeInFinishFrame = 50;
         this.iStopFrame = 50;
         this.iFadeFrame = 100;
         this.iFinishFrame = 110;
         this.fMoveSpeed = -0.35f;
         this.xRenderComponent = asd2;
         Program.GetTheGame().xRenderMaster.RegisterAboveSorted(this.xRenderComponent);
         return;
     }
     if (enNoticeType == NoticeImage.ItemNoticeType.Immediate)
     {
         StaticRenderComponent asd3 = new StaticRenderComponent();
         this.xTransform = new TransformComponent(v2Origin);
         asd3.xTransform = this.xTransform;
         asd3.txTexture = ItemCodex.GetItemDescription(enItemType).txDisplayImage;
         asd3.v2Offset = Utility.PointToVector2(asd3.txTexture);
         asd3.fScale = 1f;
         asd3.v2OffsetRenderPos = new Vector2(0f, -20f);
         this.iFrameCount = 30;
         this.iFadeInFrame = 40;
         this.iFadeInFinishFrame = 50;
         this.iStopFrame = 50;
         this.iFadeFrame = 100;
         this.iFinishFrame = 110;
         this.fMoveSpeed = -0.35f;
         this.xRenderComponent = asd3;
         Program.GetTheGame().xRenderMaster.RegisterAboveSorted(this.xRenderComponent);
     }
 }
Пример #2
0
 public NoticeImage(PlayerRenderComponent xRC, ItemCodex.ItemTypes enItemType, NoticeImage.ItemNoticeType enNoticeType)
 {
     if (enNoticeType == NoticeImage.ItemNoticeType.Immediate)
     {
         this.xPRC = xRC;
         StaticRenderComponent asd = new StaticRenderComponent();
         this.xTransform = new TransformComponent(xRC.xTransform.v2Pos);
         asd.xTransform = this.xTransform;
         asd.txTexture = ItemCodex.GetItemDescription(enItemType).txDisplayImage;
         asd.v2Offset = Utility.PointToVector2(asd.txTexture);
         asd.fScale = 1f;
         asd.v2OffsetRenderPos = new Vector2(0f, -23f);
         this.iFrameCount = 30;
         this.iFadeInFrame = 35;
         this.iFadeInFinishFrame = 50;
         this.iStopFrame = 50;
         this.iPauseFrame = 50;
         this.iFadeFrame = 51;
         this.iFinishFrame = 60;
         this.fMoveSpeed = -0.35f;
         this.xRenderComponent = asd;
         Program.GetTheGame().xRenderMaster.RegisterAboveSorted(this.xRenderComponent);
     }
 }