public MapAtmosphereProbe() { this.hideAllProbes = MapAtmosphereProbe.hideAllProbesStatic; if (!MBEditor.IsEditModeOn) { return; } this.innerSphereMesh = MetaMesh.GetCopy("physics_sphere_detailed"); this.outerSphereMesh = MetaMesh.GetCopy("physics_sphere_detailed"); this.innerSphereMesh.SetMaterial(Material.GetFromResource("light_radius_visualizer")); this.outerSphereMesh.SetMaterial(Material.GetFromResource("light_radius_visualizer")); }
private void CameraLogicInit() { this.MissionScreen.MouseVisible = true; this.MissionScreen.SceneLayer.ActiveCursor = CursorType.Default; this._camera = Camera.CreateCamera(); this._cameraFrame = MatrixFrame.Identity; this._idealCameraTarget = _cameraFrame.origin; this._cursor = GameEntity.CreateEmpty(this.Mission.Scene); this._cursor.AddComponent((GameEntityComponent)MetaMesh.GetCopy("order_arrow_a", true, false)); }
// Token: 0x060001BD RID: 445 RVA: 0x0000E03C File Offset: 0x0000C23C private GameEntity AddItem(Scene scene, ItemObject item, MatrixFrame itemFrame, MatrixFrame itemFrame1, MatrixFrame itemFrame2) { ItemRosterElement rosterElement = new ItemRosterElement(item, 0, null); MetaMesh itemMeshForInventory = rosterElement.GetItemMeshForInventory(false); if (item.IsCraftedWeapon) { MatrixFrame frame = itemMeshForInventory.Frame; frame.Elevate(-item.WeaponDesign.CraftedWeaponLength / 2f); itemMeshForInventory.Frame = frame; } GameEntity gameEntity = null; if (itemMeshForInventory != null && rosterElement.EquipmentElement.Item.ItemType == ItemObject.ItemTypeEnum.HandArmor) { gameEntity = GameEntity.CreateEmpty(scene, true); AnimationSystemData animationSystemData = Game.Current.HumanMonster.FillAnimationSystemData(MBGlobals.PlayerMaleActionSet, 1f, false); AgentVisualsNativeData agentVisualsNativeData = Game.Current.HumanMonster.FillAgentVisualsNativeData(); gameEntity.CreateSkeletonWithActionSet(ref agentVisualsNativeData, ref animationSystemData); gameEntity.SetFrame(ref itemFrame); gameEntity.Skeleton.SetAgentActionChannel(0, this.act_tableau_hand_armor_pose, 0f, -0.2f); gameEntity.AddMultiMeshToSkeleton(itemMeshForInventory); gameEntity.Skeleton.TickAnimationsAndForceUpdate(0.01f, itemFrame, true); } else if (itemMeshForInventory != null) { if (item.WeaponComponent != null) { WeaponClass weaponClass = item.WeaponComponent.PrimaryWeapon.WeaponClass; if (weaponClass == WeaponClass.ThrowingAxe || weaponClass == WeaponClass.ThrowingKnife || weaponClass == WeaponClass.Javelin || weaponClass == WeaponClass.Bolt) { gameEntity = GameEntity.CreateEmpty(scene, true); MetaMesh metaMesh = itemMeshForInventory.CreateCopy(); metaMesh.Frame = itemFrame; gameEntity.AddMultiMesh(metaMesh, true); MetaMesh metaMesh2 = itemMeshForInventory.CreateCopy(); metaMesh2.Frame = itemFrame1; gameEntity.AddMultiMesh(metaMesh2, true); MetaMesh metaMesh3 = itemMeshForInventory.CreateCopy(); metaMesh3.Frame = itemFrame2; gameEntity.AddMultiMesh(metaMesh3, true); } else { gameEntity = scene.AddItemEntity(ref itemFrame, itemMeshForInventory); } } else { gameEntity = scene.AddItemEntity(ref itemFrame, itemMeshForInventory); if (item.Type == ItemObject.ItemTypeEnum.HorseHarness && item.ArmorComponent != null) { MetaMesh copy = MetaMesh.GetCopy(item.ArmorComponent.ReinsMesh, true, true); if (copy != null) { gameEntity.AddMultiMesh(copy, true); } } } } else { MBDebug.ShowWarning("[DEBUG]Item with " + rosterElement.EquipmentElement.Item.StringId + "[DEBUG] string id cannot be found"); } gameEntity.SetVisibilityExcludeParents(false); return gameEntity; }