Exemple #1
0
        //returns true if you can go there, returns false if you just go close enough
        internal bool tryImoveHere(Moveable guy, Vector2f dest, double gameTime)
        {
            //check to see if anythings in there, foreach all the moveables
            bool b = true ;
            foreach (Moveable m in moveables) {
                if(m == guy)
                    continue;
                if (areCirclesIntersecting(dest, guy.getInnerRadius(), m.getMid(), m.getInnerRadius()) && !guy.isDead()) {
                    b = false;
                }
            }
            if (b && guy is PlayerClassI) {

                guy.sendPlayerTo(dest, gameTime);
            }
            //
            return b;
        }