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


C# logic.Behavior类代码示例

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


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

示例1: Instance

 public static DoMultiple Instance(int doTimes, int cooldown, Behavior behavior)
 {
     var key = new Tuple<int, int, Behavior>(doTimes, cooldown, behavior);
     DoMultiple ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new DoMultiple(doTimes, cooldown, behavior);
     return ret;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:8,代码来源:DoMultiple.cs

示例2: Instance

 public static OrderEntity Instance(float radius, short objType, Behavior behav)
 {
     var key = new Tuple<float, short, Behavior>(radius, objType, behav);
     OrderEntity ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new OrderEntity(radius, objType, behav);
     return ret;
 }
开发者ID:rotmgkillroyx,项目名称:rotmg_svr_OLD,代码行数:8,代码来源:Order.cs

示例3: Instance

 public static OrderGroup Instance(float radius, string group, Behavior behav)
 {
     var key = new Tuple<float, string, Behavior>(radius, group, behav);
     OrderGroup ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new OrderGroup(radius, group, behav);
     return ret;
 }
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:8,代码来源:Order.cs

示例4: Behaves

        //Candies
        static BehaviorDef Behaves(
            string name,
            Behavior movement = null,
            Behavior attack = null,
            Behavior reproduce = null,
            LootBehavior loot = null,
            params ConditionalBehavior[] condBehaviors)
        {
            if (loot != null)
            {
                Array.Resize(ref condBehaviors, condBehaviors.Length + 1);
                condBehaviors[condBehaviors.Length - 1] = loot;
            }

            return new BehaviorDef(
                movement ?? NullBehavior.Instance,
                attack ?? NullBehavior.Instance,
                reproduce ?? NullBehavior.Instance,
                condBehaviors);
        }
开发者ID:rotmgkillroyx,项目名称:rotmg_svr_OLD,代码行数:21,代码来源:BehaviorDb.cs

示例5: IfNot

 private IfNot(Behavior cond, Behavior result)
 {
     this.cond = cond;
     this.result = result;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:5,代码来源:Behavior.cs

示例6: False

 private False(Behavior x)
 {
     this.x = x;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:4,代码来源:Behavior.cs

示例7: Instance

 public static If Instance(Behavior cond, Behavior result, Behavior no = null)
 {
     var key = new Tuple<Behavior, Behavior, Behavior>(cond, result, no);
     If ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new If(cond, result, no);
     return ret;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:8,代码来源:Behavior.cs

示例8: OrderGroup

 private OrderGroup(float radius, string group, Behavior behav)
 {
     this.radius = radius;
     this.group = group;
     this.behav = behav;
 }
开发者ID:rotmgkillroyx,项目名称:rotmg_svr_OLD,代码行数:6,代码来源:Order.cs

示例9: And

 private And(Behavior x, Behavior y)
 {
     this.x = x;
     this.y = y;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:5,代码来源:Behavior.cs

示例10: RemoveKey

 public RemoveKey(Behavior behav)
 {
     key = behav.Key;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:4,代码来源:Behavior.cs

示例11: Timed

 private Timed(int time, Behavior behav)
 {
     this.time = time;
     this.behav = behav;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:5,代码来源:Behavior.cs

示例12: Once

 private Once(Behavior x)
 {
     this.x = x;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:4,代码来源:Behavior.cs

示例13: True

 private True(Behavior x)
 {
     this.x = x;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:4,代码来源:Behavior.cs

示例14: RandomDelay2

 private RandomDelay2(int min, int max, Behavior behav)
 {
     this.min = min;
     this.max = max;
     this.behav = behav;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:6,代码来源:Behavior.cs

示例15: IfExist

 private IfExist(int key, Behavior result, Behavior no)
 {
     this.key = key;
     this.result = result;
     this.no = no;
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:6,代码来源:Behavior.cs


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