当前位置: 首页>>代码示例>>C#>>正文


C# TriggerType类代码示例

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


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


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