コード例 #1
0
ファイル: FlyerIncoming.cs プロジェクト: Ogliss/AdMechArmoury
 public override void DrawAt(Vector3 drawLoc, bool flip = false)
 {
     if (this.innerContainer.Any)
     {
         foreach (var item in innerContainer)
         {
             ActiveFlyer flyer = item as ActiveFlyer;
             if (flyer != null)
             {
                 if (flyer.GetThingForGraphic() != null)
                 {
                     Pawn p = flyer.GetThingForGraphic() as Pawn;
                     if (p != null)
                     {
                         //    p.rotationTracker.Face(base.Position.ToVector3());
                         float angle = (base.Position.ToVector3() - drawLoc).AngleFlat();
                         p.Rotation = Pawn_RotationTracker.RotFromAngleBiased(angle);
                         p.Drawer.DrawAt(drawLoc);
                         return;
                     }
                 }
             }
         }
     }
     base.DrawAt(drawLoc, flip);
 }
コード例 #2
0
ファイル: FlyerIncoming.cs プロジェクト: Ogliss/AdMechArmoury
 public Thing GetThingForGraphic()
 {
     if (thingforgfx == null)
     {
         ActiveFlyer flyer = innerContainer[0] as ActiveFlyer;
         if (flyer != null)
         {
             if (flyer.GetThingForGraphic() != null)
             {
                 Pawn p = flyer.GetThingForGraphic() as Pawn;
                 if (p != null)
                 {
                     thingforgfx = flyer.GetThingForGraphic();
                 }
             }
         }
     }
     return(thingforgfx);
 }