コード例 #1
0
ファイル: AI5026.cs プロジェクト: renruoyu1989/rougelikeman
 protected override void OnInit()
 {
     AIBase.ActionChoose action = new AIBase.ActionChoose {
         name      = "actionchoose",
         m_Entity  = base.m_Entity,
         Condition = new Func <bool>(this.GetCanMoveToHatred)
     };
     AIBase.ActionSequence sequence = new AIBase.ActionSequence {
         m_Entity = base.m_Entity,
         name     = "actionseqtrue"
     };
     sequence.AddAction(new AIMove1047(base.m_Entity));
     sequence.AddAction(new AIMove1006(base.m_Entity, 0x708, 0x9c4));
     action.ResultTrue = sequence;
     AIBase.ActionSequence sequence2 = new AIBase.ActionSequence {
         m_Entity = base.m_Entity,
         name     = "actionseq"
     };
     sequence2.AddAction(base.GetActionWaitRandom("actionwaitrandom1", 300, 600));
     sequence2.AddAction(new AIMove1002(base.m_Entity, 800, 0x3e8));
     action.ResultFalse = sequence2;
     AIBase.ActionSequence sequence3 = new AIBase.ActionSequence {
         m_Entity = base.m_Entity,
         name     = "actionseq1"
     };
     sequence3.AddAction(action);
     base.AddAction(sequence3);
 }
コード例 #2
0
ファイル: AI5003.cs プロジェクト: renruoyu1989/rougelikeman
 private ActionBasic.ActionBase GetMove()
 {
     AIBase.ActionSequence sequence = new AIBase.ActionSequence {
         ConditionBase = new Func <bool>(this.GetIsAlive)
     };
     sequence.AddAction(new AIMove1008(base.m_Entity, 1f, 0x3e8));
     sequence.AddAction(base.GetActionWait("actionwait", 300));
     AIBase.ActionSequence sequence2 = new AIBase.ActionSequence {
         ConditionBase = new Func <bool>(this.GetIsAlive)
     };
     sequence2.AddAction(new AIMove1008(base.m_Entity, 1f, 0x3e8));
     sequence2.AddAction(base.GetActionWait("actionwait", 300));
     AIBase.ActionChoose action = new AIBase.ActionChoose {
         m_Entity   = base.m_Entity,
         Condition  = new Func <bool>(this.RandomMove3),
         ResultTrue = sequence2
     };
     sequence.AddAction(action);
     return(sequence);
 }
コード例 #3
0
ファイル: AI3018.cs プロジェクト: renruoyu1989/rougelikeman
 protected override void OnInit()
 {
     AIBase.ActionChoose action = new AIBase.ActionChoose {
         name      = "actionchoose",
         m_Entity  = base.m_Entity,
         Condition = new Func <bool>(this.GetCanMoveToHatred)
     };
     AIBase.ActionSequence sequence = new AIBase.ActionSequence {
         m_Entity = base.m_Entity,
         name     = "actionseqtrue"
     };
     if (base.m_Entity.IsElite)
     {
         AIBase.ActionChooseRandom random = new AIBase.ActionChooseRandom {
             m_Entity = base.m_Entity
         };
         random.AddAction(10, new AIMove1009(base.m_Entity));
         random.AddAction(10, new AIMove1057(base.m_Entity));
         sequence.AddAction(random);
     }
     else
     {
         sequence.AddAction(new AIMove1009(base.m_Entity));
     }
     sequence.AddAction(new AIMove1006(base.m_Entity, 0x3e8, 0x640));
     action.ResultTrue = sequence;
     AIBase.ActionSequence sequence2 = new AIBase.ActionSequence {
         m_Entity = base.m_Entity,
         name     = "actionseq"
     };
     sequence2.AddAction(base.GetActionWaitRandom("actionwaitrandom1", 100, 300));
     sequence2.AddAction(new AIMove1002(base.m_Entity, 600, 800));
     action.ResultFalse = sequence2;
     AIBase.ActionSequence sequence3 = new AIBase.ActionSequence {
         m_Entity = base.m_Entity,
         name     = "actionseq1"
     };
     sequence3.AddAction(action);
     base.AddAction(sequence3);
 }