Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        //MainCamera.orthographicSize = 5 * (Screen.width / Screen.height) / (LogicDim.X / LogicDim.Y);

        RootSprite = Util.NewGameObject("RootSprite", null);
        //RootSprite.transform.localScale = Vector3.one * (MainCamera.orthographicSize / LogicDim.Y);

        Application.targetFrameRate = 50;

        ResMgr.CreateInstance();
        ResMgr.Instance.Init();

        gameObject.AddComponent <FxPool>();
        FxPool.Instance.Init();

        ProtoMgr.CreasteInstance();
        ProtoMgr.Instance.Init((string path) =>
        {
            TextAsset ta = ResMgr.Instance.Load(path) as TextAsset;
            return(ta.text);
        });

        BulletViewPool.CreasteInstance();
        BulletViewPool.Instance.Init();

        Cursor.lockState = CursorLockMode.None;
        Cursor.visible   = true;

        SetupFightCtller();
    }
Esempio n. 2
0
 public static void DestroyInstance()
 {
     Instance = null;
 }
Esempio n. 3
0
 public static void CreasteInstance()
 {
     Instance = new BulletViewPool();
 }