Example #1
0
 public override bool execute(Fusion.GameTime gameTime)
 {
     ((Submarine)Entity).damage();
     ((Team)Entity.Parent).AI.NotifyMineDamage((Submarine)Entity);
     if (Entity.ToRemove)
     {
         ActionsQueue.deleteAllFor(Entity);
     }
     return(true);
 }
 protected override void Draw(Fusion.GameTime gameTime, StereoEye stereoEye)
 {
     base.Draw(gameTime, stereoEye);
     if (DateTime.Now > nextSnapshotTime)
     {
         Bitmap bmp;
         backBufferToBitmap(out bmp);
         bmp.Save(Wheel.Current(), ImageFormat.Png);
         bmp.Dispose();
         nextSnapshotTime = nextSnapshotTime.Add(snapshotPeriod);
         Wheel.Next();
     }
 }
Example #3
0
 public override bool execute(Fusion.GameTime gameTime)
 {
     if (Entity.Cell == sub1.Cell)
     {
         ((Submarine)Entity).damage();
         ((Team)Entity.Parent).AI.NotifyAccident((Submarine)Entity);
         ActionsQueue.Field.addNewNoise(Entity.Cell, Config.NOISE_ACCIDENT);
         if (Entity.ToRemove)
         {
             ActionsQueue.deleteAllFor(Entity);
         }
     }
     return(true);
 }
Example #4
0
 public override bool execute(Fusion.GameTime gameTime)
 {
     ((Submarine)Entity).damage();
     ((Team)Entity.Parent).AI.NotifyTorpedoDamage((Submarine)Entity);
     return(true);
 }
Example #5
0
 public override bool execute(Fusion.GameTime gameTime)
 {
     ((Submarine)Entity).reload();
     return(true);
 }