public void DrawBone(Vector2 position, Vector2 endPosition, bool isSelected, bool isHovered, Color color) { color.a = boneOpacity; Color outlineColor = Color.black; outlineColor.a = boneOpacity * boneOpacity; if (isSelected || (isHovered && IsActionActive(BindPoseAction.SelectBone))) { outlineColor = Color.yellow; } Color nodeColor = Color.black; if (isHovered && IsActionActive(BindPoseAction.MoveBone) || isSelected && IsActionHot(BindPoseAction.MoveBone)) { nodeColor = Color.yellow; } nodeColor.a = boneOpacity; BoneDrawingUtility.DrawBoneOutline(position, endPosition, outlineColor); BoneDrawingUtility.DrawBoneBody(position, endPosition, color); BoneDrawingUtility.DrawBoneNodeOutline(position, color); BoneDrawingUtility.DrawBoneNode(position, nodeColor.AlphaMultiplied(0.5f)); }
public override int DoChartGUI(int currentFrame, ProfilerArea currentArea) { int res = base.DoChartGUI(currentFrame, currentArea); if (m_Markers != null && showMarkers) { Rect rect = GUILayoutUtility.GetLastRect(); rect.xMin += Chart.kSideWidth; for (int index = 0; index < m_Markers.Length; index++) { var marker = m_Markers[index]; Color color = ProfilerColors.chartAreaColors[(uint)m_Series.Length % ProfilerColors.chartAreaColors.Length]; Chart.DrawVerticalLine(marker.frame, m_Data, rect, color.AlphaMultiplied(0.3f), color.AlphaMultiplied(0.4f), 1.0f); } DrawMarkerLabels(m_Data, rect, m_Markers, m_MarkerNames); } return(res); }
public override int DoChartGUI(int currentFrame, ProfilerArea currentArea, out Chart.ChartAction action) { int result = base.DoChartGUI(currentFrame, currentArea, out action); if (this.m_Markers != null && this.showMarkers) { Rect lastRect = GUILayoutUtility.GetLastRect(); lastRect.xMin += 170f; for (int i = 0; i < this.m_Markers.Length; i++) { EventMarker eventMarker = this.m_Markers[i]; Color color = ProfilerColors.colors[(int)(checked ((IntPtr)(unchecked ((ulong)eventMarker.objectInstanceId % (ulong)((long)ProfilerColors.colors.Length)))))]; Chart.DrawVerticalLine(eventMarker.frame, this.m_Data, lastRect, color.AlphaMultiplied(0.3f), color.AlphaMultiplied(0.4f), 1f); } this.DrawMarkerLabels(this.m_Data, lastRect, this.m_Markers, this.m_MarkerNames); } return(result); }
public override void SetupAttributes() { base.SetupAttributes(); blacklistedSkills = new[] { LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/EngiBody/EngiCancelTargetingDummy"), LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/EngiBody/EngiConfirmTargetDummy"), LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/EngiBody/EngiBodyPlaceTurret"), LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/EngiBody/EngiBodyPlaceWalkerTurret"), LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/EngiBody/EngiHarpoons"), LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/CaptainBody/CaptainCancelDummy"), LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/CaptainBody/PrepSupplyDrop"), }; var rampTex = Addressables.LoadAssetAsync <Texture2D>("RoR2/Base/Common/ColorRamps/texRampDefault.png") .WaitForCompletion(); var tmpPrefab = LegacyResourcesAPI.Load <GameObject>("Prefabs/NetworkedObjects/HealPack").InstantiateClone("TkSatTempSetupPrefab", false); var wispColor = new Color(0.3f, 0.05f, 0.4f); var vros = tmpPrefab.GetComponent <VelocityRandomOnStart>(); vros.enabled = false; var dstroy = tmpPrefab.GetComponent <DestroyOnTimer>(); dstroy.duration = wispDuration; var blinker = tmpPrefab.GetComponent <BeginRapidlyActivatingAndDeactivating>(); blinker.delayBeforeBeginningBlinking = dstroy.duration - 1f; var trail = tmpPrefab.transform.Find("HealthOrbEffect/TrailParent/Trail").gameObject; var tren = trail.GetComponent <TrailRenderer>(); tren.material.SetTexture("_RemapTex", rampTex); tren.material.SetColor("_TintColor", wispColor); var core = tmpPrefab.transform.Find("HealthOrbEffect/VFX/Core").gameObject; var cren = core.GetComponent <ParticleSystem>(); var ccol = cren.colorOverLifetime; ccol.color = new ParticleSystem.MinMaxGradient(wispColor, wispColor.AlphaMultiplied(0f)); core.transform.localScale *= 0.5f; var pulse = tmpPrefab.transform.Find("HealthOrbEffect/VFX/PulseGlow").gameObject; var pren = pulse.GetComponent <ParticleSystem>(); var pcol = pren.colorOverLifetime; pcol.color = new ParticleSystem.MinMaxGradient(wispColor, wispColor.AlphaMultiplied(0f)); pulse.transform.localScale *= 0.5f; var pickup = tmpPrefab.transform.Find("PickupTrigger").gameObject; pickup.transform.parent = null; GameObject.DestroyImmediate(pickup); var grav = tmpPrefab.transform.Find("GravitationController").gameObject; MonoBehaviour.Destroy(grav.GetComponent <GravitatePickup>()); var gravramp = grav.AddComponent <VoidwispController>(); gravramp.duration = dstroy.duration; gravramp.parentRigidbody = tmpPrefab.GetComponent <Rigidbody>(); gravramp.teamFilter = tmpPrefab.GetComponent <TeamFilter>(); wispPrefab = tmpPrefab.InstantiateClone("TkSatVoidWisp", true); GameObject.Destroy(tmpPrefab); itemDef.requiredExpansion = Addressables.LoadAssetAsync <ExpansionDef>("RoR2/DLC1/Common/DLC1.asset") .WaitForCompletion(); On.RoR2.ItemCatalog.SetItemRelationships += (orig, providers) => { var isp = ScriptableObject.CreateInstance <ItemRelationshipProvider>(); isp.relationshipType = DLC1Content.ItemRelationshipTypes.ContagiousItem; isp.relationships = new[] { new ItemDef.Pair { itemDef1 = PixieTube.instance.itemDef, itemDef2 = itemDef } }; orig(providers.Concat(new[] { isp }).ToArray()); }; }