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

C# TriggerType类代码示例

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

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



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

示例1: TriggerAttribute

        /// <summary>
        /// Initializes a new instance of the TriggerAttribute based on the type of trigger and response type
        /// </summary>
        /// <param name="triggerType">Type of trigger implemented by the action in question, either Push or Poll</param>
        /// <param name="responseType">Type of data sent to the Logic App from the trigger. This is used to generate the correct body schema for the Logic App designer.</param>
        public TriggerAttribute(TriggerType triggerType, Type responseType)
            : this(triggerType)
        {
            if (responseType == null) return;

            ResponseType = responseType;
        }
开发者ID:ninocrudele,项目名称:TRex,代码行数:12,代码来源:TriggerAttribute.cs


示例2: ContextCommand

 public ContextCommand( KeyMap keyMap, KeyMap.GameInput input, Action<float> cb, TriggerType triggerType = TriggerType.Down )
 {
     input_ = input;
     callback_ = cb;
     keyMap_ = keyMap;
     triggerType_ = triggerType;
 }
开发者ID:sarkahn,项目名称:unitygamelooptesting,代码行数:7,代码来源:ContextCommand.cs


示例3: Trigger

 public Trigger()
 {
     type = TriggerType.GameRule;
     conflicting = false;
     enabled = true;
     priority = 0;
 }
开发者ID:RagingBigFemaleBird,项目名称:sgs,代码行数:7,代码来源:Trigger.cs


示例4: AddTrigger

        private static BaseTrigger AddTrigger(string name, TriggerType type)
        {
            if (name == null || type.ToString() == null)
            {
                Log.Instance.Error("{0}/ChatBot (unknown trigger): Trigger not defined correctly. Not loading...", name);
                return null;
            }

            BaseTrigger trigger = triggerFactory.CreateTrigger(type, name);
            try
            {
                Log.Instance.Debug(username + "/ChatBot: Testing onload for {0} trigger {1}", type, name);
                if (trigger != null && trigger.OnLoad())
                {
                    Log.Instance.Silly(username + "/ChatBot: onload success for {0} trigger {1}", type, name);
                    triggers.Add(trigger);
                    return trigger;
                }
                else if (trigger != null)
                {
                    Log.Instance.Error(username + "/ChatBot: Error loading {0} trigger {1}", type, name);
                    return null;
                }
            }
            catch (Exception e)
            {
                Log.Instance.Error(username + "/ChatBot: Error loading {0} trigger {1}: {2}", type, name, e.StackTrace);
                return null;
            }
            return null;
        }
开发者ID:bonnici,项目名称:SteamChatBot,代码行数:31,代码来源:Bot.cs


示例5: Reset

 public override void Reset()
 {
     trigger = TriggerType.OnTriggerEnter;
     collideTag = "Untagged";
     sendEvent = null;
     storeCollider = null;
 }
开发者ID:CodeStrumpet,项目名称:Elemental,代码行数:7,代码来源:TriggerEvent.cs


示例6: Trigger

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="Name">Name</param>
 /// <param name="Definition">Definition</param>
 /// <param name="Type">Type</param>
 /// <param name="ParentTable">Parent table</param>
 public Trigger(string Name, string Definition, TriggerType Type, Table ParentTable)
 {
     this.Name = Name;
     this.Definition = Definition;
     this.Type = Type;
     this.ParentTable = ParentTable;
 }
开发者ID:JKLFA,项目名称:Craig-s-Utility-Library,代码行数:14,代码来源:Trigger.cs


示例7: GeneralTrigger

        public GeneralTrigger(BsonDocument doc, TriggerType triggerType) {
            TriggerOn = new List<string>();
            And = new List<string>();
            NotOn = new List<string>();
            MessageOverrideAsString = new List<string>();
            if (doc != null && doc.ElementCount > 0 && doc.Contains("TriggerOn")) {
                foreach (var on in doc["TriggerOn"].AsBsonArray) {
                    TriggerOn.Add(on.AsString);
                }
                foreach (var and in doc["And"].AsBsonArray) {
                    And.Add(and.AsString);
                }
                foreach (var not in doc["NoTriggerOn"].AsBsonArray) {
                    NotOn.Add(not.AsString);
                }
                AutoProcess = doc.Contains("AutoProcess") ? doc["AutoProcess"].AsBoolean : false;
                ChanceToTrigger = doc["ChanceToTrigger"].AsInt32;
                script = ScriptFactory.GetScript(doc["ScriptID"].AsString, triggerType.ToString());
                foreach (var overrides in doc["Overrides"].AsBsonArray) {
                    MessageOverrideAsString.Add(overrides.AsString);
                }
                Type = doc["Type"].AsString;
				TriggerId = doc["Id"].AsString;
            }
        }
开发者ID:jandar78,项目名称:Novus,代码行数:25,代码来源:Trigger.cs


示例8: DamageAttackerTrigger

	public DamageAttackerTrigger (string name, Unit caster, int dur, PrefabLibrary el, int dmg, TriggerType TT, Sprite icon = null)
		: base(name, TT, caster, el, dur, icon)
	{
		maxTriggers = -1;
		damage = dmg;
		description = "When this unit takes damage, " + damage.ToString () + " damage is dealt back to the attacker.";
	}
开发者ID:JohnEz,项目名称:TileBasedEngine,代码行数:7,代码来源:DamageAttackerTrigger.cs


示例9: Trigger

 public Trigger( GameWorld world, Texture2D active_texture,
     Texture2D inactive_texture, Vector2 position,
     TriggerableObject triggered_object, TriggerType type,
     float cooldown, float rotation, String name = "Trigger",
     String texture_name = TNames.ground_switch_animate, SharedResourceList<TriggerableObject> t_obj_list = null,
     float scale = 1, float density = DENSITY )
     : base(world, inactive_texture, position, name: name, texture_name: texture_name, density: density)
 {
     m_texture_name = texture_name;
     m_texture_name_helper = texture_name;
     m_active_texture = active_texture;
     m_inactive_texture = inactive_texture;
     m_buffered_position = position;
     m_size_scale = scale;
     m_radius = m_size_scale * ( m_texture.Width ) / ( GameWorld.SCALE * 2 );
     if ( t_obj_list == null ) {
         m_attached_to = new SharedResourceList<TriggerableObject>( world );
     }
     else {
         m_attached_to = t_obj_list;
     }
     if ( triggered_object != null ) {
         m_attached_to.Add( triggered_object );
     }
     m_type = type;
     m_cooldown = cooldown * 60;
     m_cooldown_timer = 0;
     m_deactivated = false;
     m_active = false;
     m_rotation = rotation;
     //m_radius = 0.2f * 5;
 }
开发者ID:mumumumu,项目名称:SpeedUp,代码行数:32,代码来源:speedup-Trigger.cs


示例10: AntispamTrigger

 public AntispamTrigger(TriggerType type, string name, TriggerOptionsBase options)
     : base(type, name, options)
 {
     options.AntiSpamTriggerOptions.groups = new Dictionary<SteamID, Dictionary<SteamID, int>>();
     Timer reducePenT = new Timer(options.AntiSpamTriggerOptions.ptimer.resolution);
     reducePenT.Elapsed += ReducePenT_Tick;
     reducePenT.Start();
 }
开发者ID:Steam-Chat-Bot,项目名称:SteamChatBot,代码行数:8,代码来源:AntispamTrigger.cs


示例11: Awake

 /**
  * Diese Methode wird vor der Startmethode aufgerufen und setzt wichtige Parameter.
  */
 void Awake()
 {
     Type = TriggerType.PermanentOpen;
     Trigger = TriggerObject.Script;
     Config = GameObject.FindWithTag( "Config" ).GetComponent<Config>();
     Ani = animation;
     NetView = networkView;
 }
开发者ID:Jonas90,项目名称:iss,代码行数:11,代码来源:TriggerHatch.cs


示例12: CreateTrigger

 public BaseTrigger CreateTrigger(TriggerType type, string name)
 {
     if(TriggerTypes.ContainsKey(type.ToString()))
     {
         return new BaseTrigger(type, name);
     }
     return null;
 }
开发者ID:bonnici,项目名称:SteamChatBot,代码行数:8,代码来源:TriggerFactory.cs


示例13: TriggerEventNotification

 public TriggerEventNotification(string triggerName, string objectName, TriggerType triggerType, TriggerEventType eventType, int invokeCount)
 {
     InvokeCount = invokeCount;
     EventType = eventType;
     ObjectName = objectName;
     TriggerType = triggerType;
     TriggerName = triggerName;
 }
开发者ID:prepare,项目名称:deveeldb,代码行数:8,代码来源:TriggerEventNotification.cs


示例14: Fire

	public override void Fire(GameObject offender, TriggerType type = TriggerType.GENERAL)
	{
		Inventory possible_owner = offender.GetComponent<Inventory>();

		if(possible_owner) {
			possible_owner.Pickup(m_Item);
		}
	}
开发者ID:dreac0nic,项目名称:1gam.crystalcaves,代码行数:8,代码来源:InventoryPickupTarget.cs


示例15: MyTriggerComponent

        public MyTriggerComponent()
        {
            m_triggerType = TriggerType.AABB;
            UpdateFrequency = 300;

            m_updateOffset = m_triggerCounter++*PRIME%UpdateFrequency;
            DoQuery = true;
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:8,代码来源:MyTriggerComponent.cs


示例16: Trigger

 public Trigger(MessageInfo msg, TriggerType type)
 {
     this.OnlyOneUse = false;
     this.RunOnReceivedMsg = false;
     this.Conditions = new List<Condition>();
     this.Message = msg;
     this.Type = type;
 }
开发者ID:jmacnico,项目名称:Proxmulator,代码行数:8,代码来源:Trigger.cs


示例17: Fire

	public override void Fire(GameObject offender, TriggerType type = TriggerType.GENERAL)
	{
		Rigidbody body = offender.GetComponent<Rigidbody>();

		if(body) {
			body.AddForce(PushPower*this.transform.forward);
		}
	}
开发者ID:dreac0nic,项目名称:1gam.crystalcaves,代码行数:8,代码来源:RigidbodyPushTarget.cs


示例18: Fire

	public override void Fire(GameObject offender, TriggerType type = TriggerType.GENERAL)
	{
		/*
		WeaponInventory offenderInventory = offender.GetComponent<WeaponInventory>();

		if(offenderInventory)
			offenderInventory.PickupWeapon(m_Weapon);
		//*/
	}
开发者ID:dreac0nic,项目名称:1gam.crystalcaves,代码行数:9,代码来源:PickupWeaponTarget.cs


示例19: SwitchTrigger

 public SwitchTrigger(LampSwitch a_switch, TriggerType a_triggerType)
 {
     if (a_switch == null)
     {
         throw new ArgumentNullException();
     }
     m_switch = a_switch;
     m_triggerType = a_triggerType;
     m_lastOn = a_switch.isOn();
 }
开发者ID:theKyuu,项目名称:GLhf,代码行数:10,代码来源:SwitchTrigger.cs


示例20: ProcessMessages

 void ProcessMessages(TriggerType triggerType)
 {
     foreach (Message m in messages)
     {
         if(m.target && m.triggerType == triggerType)
         {
             m.target.SendMessage(m.function, m.value);
         }
     }
 }
开发者ID:Almax27,项目名称:LD33,代码行数:10,代码来源:MessageHelper.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Triple类代码示例发布时间:2022-05-24
下一篇:
C# TriggerStep类代码示例发布时间: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