コード例 #1
0
        public static bool GoesIntoNet(this Puck puck)
        {
            var me = Current.World.GetMyPlayer();
            var a  = puck.GetDistanceTo(me.NetFront, puck.Y) / puck.X;

            var futurePuckY = Math.Abs(a) * puck.SpeedY + puck.Y;

            return(futurePuckY < me.NetBottom && futurePuckY > me.NetTop);
        }