Inheritance: CCNode
示例#1
0
        private void CreateVines()
        {
            const int vineOffset = 8;

            leftVine           = new Vine();
            leftVine.PositionX = -width / 2.0f + vineOffset;
            this.AddChild(leftVine);

            rightVine           = new Vine();
            rightVine.PositionX = width / 2.0f - vineOffset;
            this.AddChild(rightVine);
        }
        private void CreateVines()
        {
            // Increasing this value moves the vines closer to the
            // center of the paddle.
            const int vineDistanceFromEdge = 4;

            leftVine = new Vine();
            var leftEdge = -width / 2.0f;

            leftVine.PositionX = leftEdge + vineDistanceFromEdge;
            this.AddChild(leftVine);

            rightVine = new Vine();
            var rightEdge = width / 2.0f;

            rightVine.PositionX = rightEdge - vineDistanceFromEdge;
            this.AddChild(rightVine);
        }
示例#3
0
		private void CreateVines()
		{
            // Increasing this value moves the vines closer to the 
            // center of the paddle.
			const int vineDistanceFromEdge = 4;

			leftVine = new Vine ();
            var leftEdge = -width / 2.0f;
            leftVine.PositionX = leftEdge + vineDistanceFromEdge;
			this.AddChild (leftVine);

			rightVine = new Vine ();
            var rightEdge = width / 2.0f;
            rightVine.PositionX = rightEdge - vineDistanceFromEdge;
			this.AddChild (rightVine);
		}