void Start() { powerRenderMat = GetComponent <MeshRenderer>(); powerValue = -1; variety = transform.GetComponentInParent <Pvr_ControllerModuleInit>().Variety; currentDevice = transform.GetComponentInParent <Pvr_ControllerVisual>().currentDevice; }
void Start() { powerImage = transform.GetComponent <Image>(); powerValue = -1; variety = transform.GetComponentInParent <Pvr_ControllerModuleInit>().Variety; currentDevice = transform.GetComponentInParent <Pvr_ControllerVisual>().currentDevice; }
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 }
void Start() { variety = transform.GetComponentInParent <Pvr_ControllerModuleInit>().Variety; currentDevice = GetComponentInParent <Pvr_ControllerVisual>().currentDevice; touchRenderer = GetComponent <MeshRenderer>(); }
void Start() { variety = transform.GetComponentInParent<Pvr_ControllerModuleInit>().Variety; }