示例#1
0
 void Start()
 {
     powerRenderMat = GetComponent <MeshRenderer>();
     powerValue     = -1;
     variety        = transform.GetComponentInParent <Pvr_ControllerModuleInit>().Variety;
     currentDevice  = transform.GetComponentInParent <Pvr_ControllerVisual>().currentDevice;
 }
示例#2
0
 void Start()
 {
     powerImage    = transform.GetComponent <Image>();
     powerValue    = -1;
     variety       = transform.GetComponentInParent <Pvr_ControllerModuleInit>().Variety;
     currentDevice = transform.GetComponentInParent <Pvr_ControllerVisual>().currentDevice;
 }
示例#3
0
    void Awake()
    {
#if !UNITY_EDITOR && UNITY_ANDROID
        int enumindex = (int)GlobalIntConfigs.iCtrlModelLoadingPri;
        Render.UPvr_GetIntConfig(enumindex, ref systemOrUnity);
#endif
        DestroyController();
        Variety       = transform.GetComponentInParent <Pvr_ControllerModuleInit>().Variety;
        isCustomModel = transform.GetComponentInParent <Pvr_ControllerModuleInit>().IsCustomModel;
        if (!isCustomModel)
        {
            Pvr_ControllerManager.PvrServiceStartSuccessEvent += ServiceStartSuccess;
            Pvr_ControllerManager.SetControllerAbilityEvent   += CheckControllerStateOfAbility;
            Pvr_ControllerManager.ControllerStatusChangeEvent += CheckControllerStateForGoblin;
        }
#if UNITY_EDITOR
        controller3.SetActive(true);
#endif
    }
    void Awake()
    {
#if ANDROID_DEVICE
        int enumindex = (int)GlobalIntConfigs.iCtrlModelLoadingPri;
        Render.UPvr_GetIntConfig(enumindex, ref systemOrUnity);
#endif
        Variety       = transform.GetComponentInParent <Pvr_ControllerModuleInit>().Variety;
        isCustomModel = transform.GetComponentInParent <Pvr_ControllerModuleInit>().IsCustomModel;
        if (!isCustomModel)
        {
            Pvr_ControllerManager.PvrServiceStartSuccessEvent += ServiceStartSuccess;
            Pvr_ControllerManager.SetControllerAbilityEvent   += CheckControllerStateOfAbility;
            Pvr_ControllerManager.ControllerStatusChangeEvent += CheckControllerStateForGoblin;
        }

#if UNITY_EDITOR
        var neo2Go   = Instantiate(Variety == ControllerVariety.Controller0 ? neo2L : neo2R, transform, false);
        var neo2Comp = neo2Go.AddComponent <Pvr_ControllerVisual>();
        neo2Comp.currentDevice = ControllerDevice.Neo2;
        LoadTexture(neo2Comp, neo2TexbasePath, true);
#endif
    }
示例#5
0
 void Start()
 {
     variety       = transform.GetComponentInParent <Pvr_ControllerModuleInit>().Variety;
     currentDevice = GetComponentInParent <Pvr_ControllerVisual>().currentDevice;
     touchRenderer = GetComponent <MeshRenderer>();
 }
 void Start()
 {
     variety = transform.GetComponentInParent<Pvr_ControllerModuleInit>().Variety;
 }