Giter Club home page Giter Club logo

xlaf's Introduction

XLAF —— A simple 2D game/app framework

中文说明

XLAF(XueLan's Application Framework) is a simple 2D framework, contains scene manager, audio manager, multi language manager and so on. Developers have more time to develop their games or apps.
XLAF often use to develop games or apps for only one unity scene but many prefabs(views), developers can modify code to support mutilple unity scenes.

Usages

See Sample folder.

Naming Conventions

  • Variables => camelCase. such as thisIsVariable.
  • Functions => PascalCase. such as ThisIsFunction.
  • Local variables or functions => underline+camelCase/PascalCase. such as _thisIsPrivateVariable _ThisIsPrivateFunction (not all private variables/functions start with underline ).
  • gameobjects in unity =>PascalCase. such as SceneViewRoot.
  • Normally class name is file name, if a file contains multi class, the file name is the primary class name.

Used third party plugins

  • SimpleJson
  • iTween
  • SharpZipLib
  • Texture Packer

Project file list & illustration

Normally a project structure like this:
note 1: "【】" include folder illustration.
note 2: do NOT change name for marked star "*" folders, or project will get errors.

ProjectFolder
    |-- Assets
    |     |-- 3rd-party【plugins written by C#】
    |     |-- *Editor【editor folder, unity built-in】
    |     |-- Materials【materials】
    |     |-- *Plugins【Native code plugins, such as   *.so  *.a files】
    |     |    |--Android【Android native code, usually *.aar or *.jar】
    |     |    `--IOS【iOS native code, usually *.mm & *.h】
    |     |-- *Resources【Unity resources folder】
    |     |    |--*Audios【Audios, usually start with "m_" means music, "s_" means sound】
    |     |    |--*ImageSheets【image sheets that TexturePacker made】
    |     |    `--*Views【prefabs】
    |     |        |--*Popups【Popup prefabs】
    |     |        `--*Scenes【Scene prefabs】
    |     |-- *Scripts【C# scripts】
    |     |    |--Views
    |     |    |    |--Popups【Scripts for popup prefabs】
    |     |    |    `--Scenes【Scripts for scene prefabs】
    |     |    `--Any other C# code folders
    |     |-- *StreamingAssets【Unity default folder, read only, not compressed】
    |     `-- *XLAF【This repertory, if you want to modify code, ensure you know the relationship with each other】
    |          |-- 3rd-party【The third party plugin】
    |          |-- Editor【editor folder, unity built-in】
    |          |-- Plugins【Native code plugins, such as   *.so  *.a files】
    |          |    |--Android【Android native code, usually *.aar or *.jar】
    |          |    `--IOS【iOS native code, usually *.mm & *.h】
    |          |-- Resources【Unity resources folder in XLAF, only backdoor resources currently】
    |          `-- Scripts
    |              |-- Public【Developer often use, namespace is XLAF.Public】
    |              `-- Private【XLAF private scripts, ONLY use for XLAF, namespace is XLAF.Private】
    `-- *Resources-Images【Images for TexturePacker, if you don't want to use TP, ignore】

Others

  • At the beginning, when I wrote this framework, I follow the previous habits, so in document "scene" means a prefab contains view, not unity scene.
  • iTween plugin, the following modifications are made:
    1. `public enum EaseType`   add   `defaultType`
    2. function `void CallBack (string callbackType)`  add callback with `Action`
    
  • DocMacker is incomplete, see the comments is better.




xlaf's People

Contributors

ses-xuelan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.