示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         I18NManager.getInstance().setLanguage(SystemLanguage.Chinese);
         I18NManager.getInstance().reset();
     }
     if (Input.GetMouseButtonUp(0))
     {
         I18NManager.getInstance().setLanguage(SystemLanguage.English);
         I18NManager.getInstance().reset();
     }
 }
示例#2
0
        // Use this for initialization
        void Start()
        {
            label = GetComponent <UILabel>();
            if (label == null)
            {
                throw new System.Exception("Not found!");
            }
            if (label.bitmapFont == null)
            {
                throw new System.Exception("Not found font!");
            }
            fontSize = label.bitmapFont.defaultSize;

            I18NManager.getInstance().addObserver(this);
        }
示例#3
0
 void OnDestroy()
 {
     I18NManager.getInstance().deleteObserver(this);
 }
示例#4
0
 static void Main(string[] args)
 {
     I18NManager.getInstance().push(1, "注册成功,您的账号是{0},密码是{1},价格是{2:F0}");
     System.Console.WriteLine("I18N:" + I18NManager.getInstance().getString(1, 'a', 2, 25.69));
     System.Console.ReadKey();
 }
示例#5
0
 void OnDestroy()
 {
     print("OnDestroy");
     I18NManager.getInstance().deleteObserver(this);
 }
示例#6
0
 void Awake()
 {
     I18NManager.getInstance().setLanguage(SystemLanguage.English);
     I18NManager.getInstance().reset();
 }