コード例 #1
0
        private bool CollideCheckConnections(ref CrystalStaticSpinner killer)
        {
            if (!AllCompanionsActive)
            {
                return(false);
            }

            for (int i = 0; i < companions.Length - 1; i++)
            {
                foreach (CrystalStaticSpinner spinner in Scene.Tracker.GetEntities <CrystalStaticSpinner>())
                {
                    if (spinner.Collidable && Collide.CheckLine(spinner, companions[i].Position, companions[i + 1].Position))
                    {
                        nearestCompanions[0] = companions[i];
                        nearestCompanions[1] = companions[i + 1];
                        killer = spinner;
                        return(true);
                    }
                }
            }
            killer = null;
            return(false);
        }
コード例 #2
0
 public bool CollideLine(Vector2 from, Vector2 to, Vector2 at)
 {
     return(Collide.CheckLine(this, from, to, at));
 }