Exemplo n.º 1
0
 public void Clear()
 {
     IsUpdate  = false;
     VoiceType = PlayerInformation.Info.PType;
     BehType   = BehaviorType.None;
     Targets.Clear();
     Damages.Clear();
     Abnormals.Clear();
     IsHit.Clear();
     //IsDeath.Clear();
     KillList.Clear();
     Effects.Clear();
     Sounds.Clear();
     Voices.Clear();
     Messages.Clear();
 }
Exemplo n.º 2
0
        public string Put(IsHit someRandomObject)
        {
            using (BattleshipDb db = new BattleshipDb())
            {
                var x = db.IsHit.First(t => t.gameId == someRandomObject.gameId);
                if (db.IsHit.Where(t => t.gameId == someRandomObject.gameId).Count() > 0)
                {
                    x.hit       = someRandomObject.hit;
                    x.whoseTurn = someRandomObject.whoseTurn;
                    x.isWon     = someRandomObject.isWon;
                }
                else
                {
                    db.IsHit.Add(someRandomObject);
                }

                db.SaveChanges();
                return("working f****r");
            }
        }
Exemplo n.º 3
0
 public void AddHit(BaseCharacter target, bool hit)
 {
     IsHit.Add(target.Name, true);
 }
 /// <summary>
 /// ウィンドウ検索。
 /// </summary>
 /// <param name="info">ウィンドウ情報。</param>
 /// <param name="hitWindows">ヒットウィンドウ格納バッファ。</param>
 /// <param name="checkHit">ヒット確認デリゲート。</param>
 static void FindWindow(WindowInfo info, List<object> hitWindows, IsHit checkHit)
 {
     if (checkHit(info))
     {
         hitWindows.Add(info.TargetObject);
     }
     for (int i = 0; i < info.Children.Length; i++)
     {
         FindWindow(info.Children[i], hitWindows, checkHit);
     }
 }