Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        NFIPluginManager xPluginManager = NFCPluginManager.Instance();

        mLoginModule = xPluginManager.FindModule <NFLoginModule>();
        mUIModule    = xPluginManager.FindModule <NFUIModule>();
        mEventModule = xPluginManager.FindModule <NFIEventModule>();
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        mNetModule   = NFCPluginManager.Instance().FindModule <NFNetModule>();
        mLoginModule = NFCPluginManager.Instance().FindModule <NFLoginModule>();
        mUIModule    = NFCPluginManager.Instance().FindModule <NFUIModule>();
        mEventModule = NFCPluginManager.Instance().FindModule <NFIEventModule>();

        mLogin.onClick.AddListener(onLoginClick);

        mNetModule.ConnectServer("127.0.0.1", 14001);

        mEventModule.RegisterCallback((int)NFUIModule.Event.LoginSuccess, OnLoginSuccess);
    }
Beispiel #3
0
    void Start()
    {
        mPlayerModule = NFCPluginManager.Instance().FindModule <NFPlayerModule>();

        mController = GetComponent <CharacterController>();
        mAnimation  = GetComponent <Animator>();

        mController.detectCollisions = false;

        // get the transform of the main camera
        if (Camera.main != null)
        {
            Camera.main.GetComponent <CameraFollow>().target = this.transform;
        }
    }
Beispiel #4
0
    // Use this for initialization
    void Start()
    {
        NFIPluginManager xPluginManager = NFCPluginManager.Instance();

        mLoginModule = xPluginManager.FindModule <NFLoginModule>();
        mUIModule    = xPluginManager.FindModule <NFUIModule>();
        mEventModule = xPluginManager.FindModule <NFIEventModule>();

        mContentList = transform.Find("Panel/ListView/Mask/Content");
        mItemModle   = mContentList.Find("Item").gameObject;
        mItemModle.transform.SetParent(null);


        mEventModule.RegisterCallback((int)NFUIModule.Event.WorldList, OnWorldList);
        mEventModule.RegisterCallback((int)NFUIModule.Event.ServerList, OnServerList);
        mEventModule.RegisterCallback((int)NFUIModule.Event.SelectServerSuccess, OnSelectServer);

        mLoginModule.RequireWorldList();
    }
Beispiel #5
0
    // Use this for initialization
    void Start()
    {
        NFIPluginManager xPluginManager = NFCPluginManager.Instance();

        mLoginModule  = xPluginManager.FindModule <NFLoginModule>();
        mUIModule     = xPluginManager.FindModule <NFUIModule>();
        mPlayerModule = xPluginManager.FindModule <NFPlayerModule>();
        mEventModule  = xPluginManager.FindModule <NFIEventModule>();


        mContentList = transform.Find("Panel/ListView/Mask/Content");
        mItemModel   = mContentList.Find("Item").gameObject;
        mItemModel.transform.SetParent(null);

        mCreateRole.onClick.AddListener(onCreateRoleClick);
        mEnterGameRole.onClick.AddListener(onEnterGameClick);

        mEventModule.RegisterCallback((int)NFPlayerModule.Event.RoleList, OnRoleList);

        mPlayerModule.RequireRoleList();
    }
Beispiel #6
0
    void Start()
    {
        NFIPluginManager xPluginManager = NFCPluginManager.Instance();

        mKernelModule = xPluginManager.FindModule <NFIKernelModule>();
    }