• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Decal类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Decal的典型用法代码示例。如果您正苦于以下问题:C# Decal类的具体用法?C# Decal怎么用?C# Decal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Decal类属于命名空间,在下文中一共展示了Decal类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: VirindiViewsPresent

        static bool VirindiViewsPresent(Decal.Adapter.Wrappers.PluginHost pHost)
        {
#if VVS_REFERENCED
            System.Reflection.Assembly[] asms = AppDomain.CurrentDomain.GetAssemblies();

            foreach (System.Reflection.Assembly a in asms)
            {
                AssemblyName nmm = a.GetName();
                if ((nmm.Name == "VirindiViewService") && (nmm.Version >= new System.Version("1.0.0.37")))
                {
                    try
                    {
                        return Curtain_VVS_Running();
                    }
                    catch
                    {
                        return false;
                    }
                }
            }

            return false;
#else
            return false;
#endif
        }
开发者ID:Kkarinisme,项目名称:Handyman,代码行数:26,代码来源:ViewSystemSelector.cs


示例2: CharacterFilter_ChangePortalMode

 private void CharacterFilter_ChangePortalMode(object sender, Decal.Adapter.Wrappers.ChangePortalModeEventArgs e)
 {
     if (e.Type == this._expectedPortalEventType)
     {
         this._event.Set();
     }
 }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:7,代码来源:PortalSpaceWaiter.cs


示例3: BuildDecalForObject

    public static void BuildDecalForObject(Decal decal, GameObject affectedObject)
    {
        Mesh affectedMesh = affectedObject.GetComponent<MeshFilter>().sharedMesh;
        if(affectedMesh == null) return;

        float maxAngle = decal.maxAngle;

        Plane right = new Plane( Vector3.right, Vector3.right/2f );
        Plane left = new Plane( -Vector3.right, -Vector3.right/2f );

        Plane top = new Plane( Vector3.up, Vector3.up/2f );
        Plane bottom = new Plane( -Vector3.up, -Vector3.up/2f );

        Plane front = new Plane( Vector3.forward, Vector3.forward/2f );
        Plane back = new Plane( -Vector3.forward, -Vector3.forward/2f );

        Vector3[] vertices = affectedMesh.vertices;
        int[] triangles = affectedMesh.triangles;
        int startVertexCount = bufVertices.Count;

        Matrix4x4 matrix = decal.transform.worldToLocalMatrix * affectedObject.transform.localToWorldMatrix;

        for(int i=0; i<triangles.Length; i+=3) {
            int i1 = triangles[i];
            int i2 = triangles[i+1];
            int i3 = triangles[i+2];

            Vector3 v1 = matrix.MultiplyPoint( vertices[i1] );
            Vector3 v2 = matrix.MultiplyPoint( vertices[i2] );
            Vector3 v3 = matrix.MultiplyPoint( vertices[i3] );

            Vector3 side1 = v2 - v1;
            Vector3 side2 = v3 - v1;
            Vector3 normal = Vector3.Cross(side1, side2).normalized;

            if( Vector3.Angle(-Vector3.forward, normal) >= maxAngle ) continue;

            DecalPolygon poly = new DecalPolygon( v1, v2, v3 );

            poly = DecalPolygon.ClipPolygon(poly, right);
            if(poly == null) continue;
            poly = DecalPolygon.ClipPolygon(poly, left);
            if(poly == null) continue;

            poly = DecalPolygon.ClipPolygon(poly, top);
            if(poly == null) continue;
            poly = DecalPolygon.ClipPolygon(poly, bottom);
            if(poly == null) continue;

            poly = DecalPolygon.ClipPolygon(poly, front);
            if(poly == null) continue;
            poly = DecalPolygon.ClipPolygon(poly, back);
            if(poly == null) continue;

            AddPolygon( poly, normal );
        }

        GenerateTexCoords(startVertexCount, decal.sprite);
    }
开发者ID:Jalict,项目名称:MED5-PGP-P1,代码行数:59,代码来源:DecalBuilder.cs


示例4: InitializeRawXML

 public void InitializeRawXML(Decal.Adapter.Wrappers.PluginHost p, string pXML, string pWindowKey)
 {
     VirindiViewService.XMLParsers.Decal3XMLParser ps = new VirindiViewService.XMLParsers.Decal3XMLParser();
     ViewProperties iprop;
     ControlGroup igroup;
     ps.Parse(pXML, out iprop, out igroup);
     myView = new VirindiViewService.HudView(iprop, igroup, pWindowKey);
 }
开发者ID:Kkarinisme,项目名称:Mishna,代码行数:8,代码来源:Wrapper_MyHuds.cs


示例5: _decalEvents_SpellCast

 void _decalEvents_SpellCast(object sender, Decal.Adapter.Wrappers.SpellCastEventArgs e)
 {
     switch (e.SpellId)
     {
         case Data.SpellIds.LifestoneRecall:
             this.OnSelfLifestoneRecall();
             break;
     }
 }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:9,代码来源:MasterOrSlaveReactions.cs


示例6: CharacterFilter_Login

		void CharacterFilter_Login(object sender, Decal.Adapter.Wrappers.LoginEventArgs e)
		{
			try
			{
				if (!Settings.SettingsManager.Misc.RemoveWindowFrame.Value)
					return;

				RemoveWindowFrame();
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
开发者ID:IbespwnAC,项目名称:MagTools,代码行数:11,代码来源:WindowFrameRemover.cs


示例7: CharacterFilter_Death

		void CharacterFilter_Death(object sender, Decal.Adapter.Wrappers.DeathEventArgs e)
		{
			try
			{
				if (!Settings.SettingsManager.Misc.LogOutOnDeath.Value)
					return;

				CoreManager.Current.Actions.Logout();
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
开发者ID:IbespwnAC,项目名称:MagTools,代码行数:11,代码来源:LogOutOnDeath.cs


示例8: CoreManager_ChatBoxMessage

 void CoreManager_ChatBoxMessage(object sender, Decal.Adapter.ChatTextInterceptEventArgs e)
 {
     REPlugin.Instance.InvokeOperationSafely(() =>
     {
         ChatEvent chatEvent;
         if (ChatEvent.TryParse(e.Text, out chatEvent))
         {
             this.HandleChatEvent(chatEvent);
         }
     });
 }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:11,代码来源:GameEventResponseDispatcher.cs


示例9: GenerateUV

	private void GenerateUV(Decal d)
	{
		if(d.GetComponent<MeshFilter>() == null) return;
		
		Mesh m = d.GetComponent<MeshFilter>().sharedMesh;
		
		Vector2[] uv = Unwrapping.GeneratePerTriangleUV(m);
			
        MeshUtility.SetPerTriangleUV2(m, uv);

        Unwrapping.GenerateSecondaryUVSet(m);
	}
开发者ID:EvilAbyss,项目名称:Wulfram,代码行数:12,代码来源:DecalEditor.cs


示例10: IsPresent

        ///////////////////////////////System presence detection///////////////////////////////

        public static bool IsPresent(Decal.Adapter.Wrappers.PluginHost pHost, eViewSystem VSystem)
        {
            switch (VSystem)
            {
                case eViewSystem.DecalInject:
                    return true;
                case eViewSystem.VirindiViewService:
                    return VirindiViewsPresent(pHost);
                default:
                    return false;
            }
        }
开发者ID:Kkarinisme,项目名称:Handyman,代码行数:14,代码来源:ViewSystemSelector.cs


示例11: ChangePortalModeCorpses

        private void ChangePortalModeCorpses(object sender, Decal.Adapter.Wrappers.ChangePortalModeEventArgs e)
        {
            try
            {
                CorpseTrackingList.Clear();
                foreach(WorldObject wo in Core.WorldFilter.GetByObjectClass(ObjectClass.Corpse))
                {
                    if(!CorpseTrackingList.Any(x => x.Id == wo.Id)){CheckCorpse(new LandscapeObject(wo));}
                }
             		UpdateCorpseHud();

            }catch(Exception ex){LogError(ex);}
        }
开发者ID:Kkarinisme,项目名称:GearTemp,代码行数:13,代码来源:CorpseTracker.cs


示例12: _decalEventsProxy_ChatBoxMessage

 void _decalEventsProxy_ChatBoxMessage(object sender, Decal.Adapter.ChatTextInterceptEventArgs e)
 {
     ICommand command;
     if (CommandHelpers.TryParse(e, out command))
     {
         switch (command.CommandType)
         {
             case CommandType.Foreign:
                 // Never eat ...Then I can't see the /f messages i'm causing...while others still can
                 Handlers.ForeignHandler.HandleCommand(command);
                 break;
         }
     }
 }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:14,代码来源:CommandListener.cs


示例13: _decalEventsProxy_CommandLineText

 void _decalEventsProxy_CommandLineText(object sender, Decal.Adapter.ChatParserInterceptEventArgs e)
 {
     ICommand command;
     if (CommandHelpers.TryParse(e, out command))
     {
         switch (command.CommandType)
         {
             case CommandType.RedoxExtension:
                 e.Eat = Handlers.RedoxExtensionsHandler.HandleCommand(command);
                 break;
             case CommandType.RedoxFellow:
                 e.Eat = Handlers.RedoxFellowHandler.HandleCommand(command);
                 break;
         }
     }
 }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:16,代码来源:CommandListener.cs


示例14: CharacterFilter_Login

		void CharacterFilter_Login(object sender, Decal.Adapter.Wrappers.LoginEventArgs e)
		{
			try
			{
				WindowPosition windowPosition;

				if (GetWindowPositionForThisClient(out windowPosition))
				{
					User32.RECT rect = new User32.RECT();

					User32.GetWindowRect(CoreManager.Current.Decal.Hwnd, ref rect);

					User32.MoveWindow(CoreManager.Current.Decal.Hwnd, windowPosition.X, windowPosition.Y, rect.Right - rect.Left, rect.Bottom - rect.Top, true);
				}
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
开发者ID:IbespwnAC,项目名称:MagTools,代码行数:17,代码来源:WindowMover.cs


示例15: DecalCore_CommandLineText

        private void DecalCore_CommandLineText(object sender, Decal.Adapter.ChatParserInterceptEventArgs e)
        {
            REWrapperPlugin.Instance.InvokeOperationSafely(() =>
            {
                if (e.Text.StartsWith(CommandPrefix_Legacy))
                {
                    var command = e.Text.Substring(CommandPrefix_Legacy.Length + 1).Trim();

                    e.Eat = this.HandleNormalCommand(command, true);
                }
                else if (e.Text.StartsWith(CommandPrefix))
                {
                    var command = e.Text.Substring(CommandPrefix.Length + 1).Trim();

                    e.Eat = this.HandleNormalCommand(command, false);
                }
            });
        }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:18,代码来源:WrapperCommandListener.cs


示例16: CharacterFilter_ChangePortalMode

        private void CharacterFilter_ChangePortalMode(object sender, Decal.Adapter.Wrappers.ChangePortalModeEventArgs e)
        {
            lock (this._lock)
            {
                if (this._complete)
                {
                    return;
                }

                this._complete = true;

                if (e.Type == this._expectedPortalEventType)
                {
                    this._onEventAction(this._stateTag);

                    this.CleanUpAndComplete();
                }
            }
        }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:19,代码来源:PortalSpaceContinuation.cs


示例17: CharacterFilter_Login

		void CharacterFilter_Login(object sender, Decal.Adapter.Wrappers.LoginEventArgs e)
		{
			try
			{
				var loginCommands = Settings.SettingsManager.AccountServerCharacter.GetOnLoginCommands(CoreManager.Current.CharacterFilter.AccountName, CoreManager.Current.CharacterFilter.Server, CoreManager.Current.CharacterFilter.Name);

				foreach (var command in loginCommands)
				{
					HudList.HudListRowAccessor newRow = loginList.AddRow();

					((HudStaticText)newRow[0]).Text = command;
					((HudPictureBox)newRow[1]).Image = 0x60028FC;
					((HudPictureBox)newRow[2]).Image = 0x60028FD;
					((HudPictureBox)newRow[3]).Image = 0x60011F8;
				}

				var loginCompleteCommands = Settings.SettingsManager.AccountServerCharacter.GetOnLoginCompleteCommands(CoreManager.Current.CharacterFilter.AccountName, CoreManager.Current.CharacterFilter.Server, CoreManager.Current.CharacterFilter.Name);

				foreach (var command in loginCompleteCommands)
				{
					HudList.HudListRowAccessor newRow = loginCompleteList.AddRow();

					((HudStaticText)newRow[0]).Text = command;
					((HudPictureBox)newRow[1]).Image = 0x60028FC;
					((HudPictureBox)newRow[2]).Image = 0x60028FD;
					((HudPictureBox)newRow[3]).Image = 0x60011F8;
				}

				var periodicCommands = Settings.SettingsManager.AccountServerCharacter.GetPeriodicCommands(CoreManager.Current.CharacterFilter.AccountName, CoreManager.Current.CharacterFilter.Server, CoreManager.Current.CharacterFilter.Name);

				foreach (var command in periodicCommands)
				{
					HudList.HudListRowAccessor newRow = periodicCommandList.AddRow();

					((HudStaticText)newRow[0]).Text = command.Command;
					((HudStaticText)newRow[1]).Text = command.Interval.TotalMinutes.ToString(CultureInfo.InvariantCulture);
					((HudStaticText)newRow[2]).Text = command.OffsetFromMidnight.TotalMinutes.ToString(CultureInfo.InvariantCulture);
					((HudPictureBox)newRow[3]).Image = 0x60011F8;
				}
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
开发者ID:IbespwnAC,项目名称:MagTools,代码行数:42,代码来源:AccountServerCharacterGUI.cs


示例18: CoreManager_CommandLineText

        private void CoreManager_CommandLineText(object sender, Decal.Adapter.ChatParserInterceptEventArgs e)
        {
            REPlugin.Instance.InvokeOperationSafely(() =>
            {
                ChatEvent chatEvent;
                if (ChatEvent.TryParse(e.Text, out chatEvent))
                {
                    if (chatEvent.SourceName.Equals(this._expectedSourceName, StringComparison.InvariantCultureIgnoreCase))
                    {
                        this._tellReceivedWaitHandle.Set();

                        if (this._unhookOnMatch)
                        {
                            this._unhooked = true;
                            REPlugin.Instance.CoreManager.CommandLineText -= CoreManager_CommandLineText;
                        }
                    }
                }
            });
        }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:20,代码来源:TellListener.cs


示例19: CharacterFilter_Login

		void CharacterFilter_Login(object sender, Decal.Adapter.Wrappers.LoginEventArgs e)
		{
			try
			{
				var commands = Settings.SettingsManager.AccountServerCharacter.GetOnLoginCommands(CoreManager.Current.CharacterFilter.AccountName, CoreManager.Current.CharacterFilter.Server, CoreManager.Current.CharacterFilter.Name);

				if (commands.Count == 0)
					return;

				if (pendingCommands.Count == 0)
					CoreManager.Current.RenderFrame += new EventHandler<EventArgs>(Current_RenderFrame);

				// This queues up a dummy command so our actions happen one frame after all the other plugins have finished Login
				pendingCommands.Enqueue(null);

				foreach (var action in commands)
					pendingCommands.Enqueue(action);
			}
			catch (Exception ex) { Debug.LogException(ex); }
		}
开发者ID:IbespwnAC,项目名称:MagTools,代码行数:20,代码来源:LoginActions.cs


示例20: DecalEventsProxy_ChatBoxMessage

        private void DecalEventsProxy_ChatBoxMessage(object sender, Decal.Adapter.ChatTextInterceptEventArgs e)
        {
            if (ChatParsingUtilities.IsChat(e.Text, this._chatFilter) && ChatParsingUtilities.IsChannel(e.Text, this._channelFilter))
            {
                if (this.FilteredChatBoxMessage != null)
                {
                    this.FilteredChatBoxMessage(sender, e);
                }

                // Only try to parse if someone is listening
                if (this.FilteredAndParsedChatBoxMessage != null)
                {
                    ParsedChatTextInterceptEventArgs parsedEventArgs = null;
                    if (ParsedChatTextInterceptEventArgs.TryCreateFrom(e, out parsedEventArgs))
                    {
                        this.FilteredAndParsedChatBoxMessage(sender, parsedEventArgs);

                        e.Eat = parsedEventArgs.Eat;
                    }
                }
            }
        }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:22,代码来源:FilteredChatBoxMessageEventProvider.cs



注:本文中的Decal类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DecayedType类代码示例发布时间:2022-05-24
下一篇:
C# DebuggerFeatures类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap