當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。