CCPoint is a class in the Cocos2d-x library for C#. It represents a point in 2D space with an x and y coordinate. It is a useful tool for positioning objects, for example within a game scene.
Example code:
CCPoint myPoint = new CCPoint(50, 100); CCSprite mySprite = new CCSprite("mySprite.png"); mySprite.Position = myPoint;
In this example, we create a new point at coordinates (50, 100) and set that as the position for a new sprite. The sprite will now be displayed at position (50, 100) within the game scene.
In this example, we create a new point at coordinates (0, 0) and then adjust its position by adding 30 to the x coordinate and 20 to the y coordinate. This could be useful for moving a sprite or other object around within the game scene.
The CCPoint class is part of the Cocos2d-x package library for C#. It is included in the Cocos2d namespace.
C# (CSharp) cocos2d CCPoint - 60 examples found. These are the top rated real world C# (CSharp) examples of cocos2d.CCPoint extracted from open source projects. You can rate examples to help us improve the quality of examples.