1.8 KiB
Contributing to CocosSharp
We encourage you to contribute to the CocosSharp repository. Your involvement is important to the success of the project.
There are some style guidelines you must follow if you want your Pull Request to be accepted:
-
Follow the .NET Design guidelines.
-
Make use of partial classes to implement the platform specific nuances of a feature.
-
Very little idiomatic coding, meaning no #if XYA #endif code blocks.
-
Document your methods and features.
-
No magic numbers. Create const members for static literals and document their use.
-
No unnecessary object instantiation to pass simple literals as parameters.
-
Use CCxxx as your class names for framework classes.
-
Maintain the single level namespace "Cocos2D/ALL_CLASSES_HERE"
-
If you use our graphics, use them in the format that we give you. You are allowed to use the graphics, logos, etc., but you can not deface them or place your logo atop of our logos.
-
Solution files are CocosSharp.Platform.sln. Platform is named such as Windows, WindowsGL, etc.
-
Project files are CocosSharp.Platform.csproj, see #10.
-
All output must go through CCLog.Log()
-
Assert only using Debug.Assert()
-
Your pull request must be atomic. Do not stack many bug fixes into a single PR.
-
Avoid unnecessary virtual method signatures. Virtual methods are significantly slower than non-virtual methods.
-
No self-factory patterns. Use typed constructors to create the state of an object.
-
Use triangle strip if at all possible. Only use a triangle list when you can't organize the polygons in a strip.
By following these rules, the framework will continue to grow in a robust and stable manner that helps all of the developers to create great software.