예제 #1
0
        public override void MoveTo(Vector location, double speed, Action doWhenArrived)
        {
            centerObject.MoveTo(location, speed, doWhenArrived);

            foreach (var obj in objects)
            {
                Vector displacement = obj.AbsolutePosition - centerObject.AbsolutePosition;
                obj.MoveTo(location + displacement, speed);
            }
        }
예제 #2
0
파일: Flappy.cs 프로젝트: juherask/sejypeli
    void LuoPutki(double x, double y)
    {
        double ht = Screen.Height;

        PyO putki = new PyO(10, ht);

        // Painovoima ei vaikuta
        putki.IgnoresPhysicsLogics = true;
        putki.CanRotate = false;
        // Ei törmäile maahan
        putki.CollisionIgnoreGroup = 1;

        putki.Position = new Vector(x, y);
        Add(putki);

        // Pistä putket tulemaan lintua kohti
        Vec movePos = new Vec(-ht, y);
        putki.MoveTo(movePos, 100);
    }
예제 #3
0
 ///<inheritdoc/>
 public override void MoveTo(Vector location, double speed, Action doWhenArrived)
 {
     centerObject.MoveTo(location, speed, doWhenArrived);
 }