예제 #1
0
        public void ShowScanAction()
        {
            var size = base.Size;

            _scanText1 = new SKLabelNode("AppleSDGothicNeo-Regular")
            {
                Text     = "Move your phone",
                FontSize = 30,
                Position = new CGPoint(size.Width / 2, 100),
                Color    = UIColor.White,
            };
            AddChild(_scanText1);

            _scanText2 = new SKLabelNode("AppleSDGothicNeo-Regular")
            {
                Text     = "to find a surface",
                FontSize = 30,
                Position = new CGPoint(size.Width / 2, 70),
                Color    = UIColor.White,
            };
            AddChild(_scanText2);

            _phone          = SKSpriteNode.FromImageNamed("phone_scaled");
            _phone.Position = new CGPoint(size.Width / 2, 190);

            var circle        = UIBezierPath.FromRoundedRect(new CGRect(new CGPoint(size.Width / 2 - 20, 190), new CGSize(40, 40)), 20);
            var moveAlongPath = SKAction.RepeatActionForever(SKAction.FollowPath(circle.CGPath, false, false, 2.0));

            _phone.RunAction(moveAlongPath);

            AddChild(_phone);

            ScanActionShowing  = true;
            ScanActionFinished = false;
        }