public void InsertIntoPRC(PlayerRenderComponent PRC) { foreach (KeyValuePair<ushort, Texture2D> kvp in this.ditxWeaponTextures) { PRC.dixAnimations[kvp.Key].xTextureSet.txWeapon = kvp.Value; } }
public PlayerLoadingRunRenderComponent(PlayerRenderComponent xParent) { this.av4ClothingColors = xParent.av4ClothingColors; this.av4HairdoColors = xParent.av4HairdoColors; PlayerAnimation xSAnim = xParent.dixAnimations[5]; this.xOwnerObject = xParent.xOwnerObject; this.iActiveAnimation = xSAnim.iID; this.dixAnimations.Add(xSAnim.iID, new PlayerAnimation(xSAnim.iID, xSAnim.byAnimationDirection, xSAnim.xTextureSet, xSAnim.v2PositionOffset, 4, xSAnim.iEndFrame, xSAnim.iCellWidth, xSAnim.iCellHeight, xSAnim.iOffsetX, xSAnim.iOffsetY, xSAnim.iFramesPerRow, Animation.LoopSettings.Looping, Animation.CancelOptions.IgnoreIfPlaying, false, false, false, new AnimationInstruction[0])); this.fAlpha = 0f; this.rt2dCurrentFrame = new RenderTarget2D(Program.GetTheGame().GraphicsDevice, 150, 150, false, SurfaceFormat.Color, DepthFormat.None); }
public static void SetPRCWeaponToNullTex(PlayerRenderComponent PRC) { ushort[] ailol = new ushort[] { 100, 101, 102, 103, 104, 105, 106, 107, 200, 201, 202, 203, 204, 205, 206, 207, 208, 212, 213, 214, 215, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 574, 575, 576, 577, 578, 579, 580, 581 }; for (int i = 0; i < ailol.Length; i++) { PRC.dixAnimations[ailol[i]].xTextureSet.txWeapon = RenderMaster.txNullTex; } }
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); } }
public void Enter() { this.v2GhostCursorPos = Vector2.Zero; Game1 Master = Program.GetTheGame(); Master._InGameMenu_SortInventoryView(); Master._InGameMenu_SortCraftingView(); Master._InGameMenu_SortEnemiesAndShit(); if (Master.xNetworkInfo.enCurrentRole == NetworkHelperInterface.NetworkRole.LocalOnly) { Master.xSoundSystem.PauseCues(); } this.bInGameMenu = true; this.bJustChangedState = true; this.xTopView.bIsEntering = true; this.enCurrentView = InGameMenu.BaseView.Main; this.xTopView.fEntireMenuAppear = 0f; this.xTopView.bIsExiting = false; this.xSystemView.iSelectedZoomLevel = Master.xOptions.iZoom; this.xSystemView.enSelectedFullScreen = Master.xOptions.enFullScreen; this.ChangeBotHelpBar(new InGameMenu.HelpBarBotEntry[] { new InGameMenu.HelpBarBotEntry(Master.xInput_Menu.Action, "Select"), new InGameMenu.HelpBarBotEntry(Master.xInput_Menu.MenuButton, "Exit Menu") }); if (this.xPlayerPreview == null) { bool bIsCancelable = Master.xLocalPlayer.xEntity.bAttackCancelable; this.xPlayerPreview = new PlayerRenderComponent(Master.xLocalPlayer.xEntity); this.xPlayerPreview.av4ClothingColors = this.xPlayerPreview.xOwnerObject.xRenderComponent.av4ClothingColors; string sFemale = ""; if (!this.xPlayerPreview.xOwnerObject.Owner.xViewStats.bIsMale) { sFemale = "Female"; } this.xPlayerPreview.dixAnimations.Add(2, new PlayerAnimation(2, 2, Master._Animations_GetAnimationSet(this.xPlayerPreview.xOwnerObject.Owner, "Idle" + sFemale, "Down", false, false, false, false), new Vector2(12f, 30f), 4, 1, 24, 32, 0, 0, 1, Animation.LoopSettings.Clamp, Animation.CancelOptions.IgnoreIfPlaying, true, false, true, new AnimationInstruction[0])); this.xPlayerPreview.xTransform = new TransformComponent(new Vector2(134f, 168f)); this.xPlayerPreview.SwitchAnimation(2, Animation.CancelOptions.IgnoreIfPlaying, 1f); this.xPlayerPreview.GetCurrentAnimation().recCurrentFrame = new Rectangle(0, 0, 24, 32); this.xPlayerPreview.Update(); Master.xLocalPlayer.xEntity.bAttackCancelable = bIsCancelable; } Master.xLocalPlayer.xGUIStuff.ClearEquipQueue(); this.xPlayerPreview.av4HairdoColors = this.xPlayerPreview.xOwnerObject.xRenderComponent.av4HairdoColors; if (this.xJournalView.xEnemyCharSprite == null) { this.xJournalView.xEnemyCharSprite = new AnimatedRenderComponent(new EntityShell(new Vector2(358f, 160f) * 2f)); this.xJournalView.xEnemyCharSprite.xCamera = new Camera(); this.xJournalView.xEnemyCharSprite.xTransform = new TransformComponent(new Vector2(358f, 160f) * 2f); } this.xPlayerPreview.xCamera = new Camera(); }
public void SetPRCWeapon(PlayerRenderComponent PRC, ItemCodex.ItemTypes enType) { if (this.denxWeaponContentManagers.ContainsKey(enType) && this.denxWeaponContentManagers[enType].bLoaded) { this.denxWeaponContentManagers[enType].InsertIntoPRC(PRC); return; } WeaponAssetLoader.SetPRCWeaponToNullTex(PRC); }