Example #1
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;
        }
    }
Example #2
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();
    }