本文整理汇总了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;
}
示例2: ContextCommand
public ContextCommand( KeyMap keyMap, KeyMap.GameInput input, Action<float> cb, TriggerType triggerType = TriggerType.Down )
{
input_ = input;
callback_ = cb;
keyMap_ = keyMap;
triggerType_ = triggerType;
}
示例3: Trigger
public Trigger()
{
type = TriggerType.GameRule;
conflicting = false;
enabled = true;
priority = 0;
}
示例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;
}
示例5: Reset
public override void Reset()
{
trigger = TriggerType.OnTriggerEnter;
collideTag = "Untagged";
sendEvent = null;
storeCollider = null;
}
示例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;
}
示例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;
}
}
示例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.";
}
示例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;
}
示例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();
}
示例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;
}
示例12: CreateTrigger
public BaseTrigger CreateTrigger(TriggerType type, string name)
{
if(TriggerTypes.ContainsKey(type.ToString()))
{
return new BaseTrigger(type, name);
}
return null;
}
示例13: TriggerEventNotification
public TriggerEventNotification(string triggerName, string objectName, TriggerType triggerType, TriggerEventType eventType, int invokeCount)
{
InvokeCount = invokeCount;
EventType = eventType;
ObjectName = objectName;
TriggerType = triggerType;
TriggerName = triggerName;
}
示例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);
}
}
示例15: MyTriggerComponent
public MyTriggerComponent()
{
m_triggerType = TriggerType.AABB;
UpdateFrequency = 300;
m_updateOffset = m_triggerCounter++*PRIME%UpdateFrequency;
DoQuery = true;
}