示例#1
0
 // charactercontrol
 void OnControllerColliderHit(ControllerColliderHit hit)
 {
     Debug.Log("OnControllerColliderHit : " + hit.gameObject.name);
     if (hit.gameObject.name == "cube")
     {
         hit.gameObject.SetActive(false);
         //CopyControl.Inst().OpenReproduceView();
         BagModule.AddItem(1);
     }
 }
示例#2
0
    protected override void OnAwake()
    {
        base.OnAwake();
        _bagModule = ModuleManager.Instance.Get <BagModule>();
        int count = _bagModule.GetBagSize();

        _totalPage             = count / 9 + 1;
        _gridLayoutGroup       = transform.Find("Mask/GridLayoutGroup");
        _hintLayoutGroup       = transform.Find("Hint");
        _tipsTrans             = transform.Find("Tips");
        _vrToggleGroup         = _hintLayoutGroup.GetComponent <VRToggleGroup>();
        _leftControllerEvents  = VRTK_SDK_Bridge.GetControllerLeftHand(false).GetComponent <VRTK_ControllerEvents>();
        _rightControllerEvents = VRTK_SDK_Bridge.GetControllerRightHand(false).GetComponent <VRTK_ControllerEvents>();
    }
示例#3
0
        //To be completed
        private void LoadModule(Type moduleType)
        {
            BaseModule bm = null;

            if (moduleType == typeof(ObjectsConfigModule))
            {
                bm = new ObjectsConfigModule();
            }
            else if (moduleType == typeof(AssemblyObjectsModule))
            {
                bm = new AssemblyObjectsModule();
            }
            else if (moduleType == typeof(BagModule))
            {
                bm = new BagModule();
            }


            if (bm != null)
            {
                bm.IsAutoResiger = true;
                bm.Load();
            }
        }
示例#4
0
 private void Awake()
 {
     _objectsConfigModule = ModuleManager.Instance.Get <ObjectsConfigModule>();
     _bagModule           = ModuleManager.Instance.Get <BagModule>();
 }