void Start() { fileControlPhoton = GameObject.FindObjectOfType <FileControlPhoton>(); colorWheel = GameObject.FindObjectOfType <ColorWheelControl>(); sdkController = GameObject.FindObjectOfType <SDKController>(); if (photonView.isMine) { _LocalPlayerInstance = this; sdkController.OnSaveSucceededEvent += SaveCSV; sdkController.OnLoadSucceededEvent += RetrieveFile; if (saving == true) { SaveCSV(); } if (loaded == true) { RetrieveFile(); } Color newColor = new Color(); newColor = colorWheel.Selection; Vector3 colorValues = new Vector3(newColor.r, newColor.g, newColor.b); ChangeCameraColor(colorValues, newColor.a); } controllers.Add(this); }
void OnEnable() { FeedBackInstance = this; sdkController = FindObjectOfType <SDKController>(); status = FindObjectOfType <Status>(); showText = status.toggle; }
private AndroidJavaObject activity; // current active androidActivity #endregion Fields #region Methods public static SDKController Instance() { if(_instance == null) { GameObject go = new GameObject("SDKController"); _instance = go.AddComponent<SDKController>(); _gameCtl = GameObject.Find("Main Camera").GetComponent<GameController>(); } return _instance; }
private void Start() { instance = this; name = "SDKController"; DontDestroyOnLoad(this.gameObject); // Config.setUUID();//获取并设置设备ID MyUtili.MyUtilities.initUUID(); //针对UnityAds做的特殊初始化处理(=======Start //它为啥和别的Ad初始化不一样? //因为unity的广告调用要开他娘的携程, //开携程就要继承mono, //继承mono就他娘的不能用new, //这就是下面这几行蛋疼的代码在这里的原因 GameObject unityAds = new GameObject(); unityAds.name = "UnityAds"; unityAds.AddComponent <UnityAds>(); DontDestroyOnLoad(unityAds); //================End) ////对于AppsFlyerManager的初始化处理 //GameObject AppsFlyerManager = new GameObject(); //AppsFlyerManager.name = "AppsFlyerManager"; //AppsFlyerManager.AddComponent<AppsFlyerManager>(); //DontDestroyOnLoad(AppsFlyerManager); //对于NativeAnalytics的初始化处理 GameObject NativeAnalytics = new GameObject(); NativeAnalytics.name = "NativeAnalytics"; NativeAnalytics.AddComponent <NativeAnalytics>(); DontDestroyOnLoad(NativeAnalytics); //对于原生广告的初始化处理 //GameObject nativeAds = new GameObject(); //nativeAds.name = "NativeAds"; //nativeAds.AddComponent<NativeAds>(); //DontDestroyOnLoad(nativeAds); AllSDKManager.Init(); MyUtili.MyUtilities.initUUID(); AllSDKManager.GetSDK <AdSdk>().IsEnable = Config.isRemovedAD() ? false : true; //AllSDKManager.GetSDK<AdSdk>().IsEnable = true; AllSDKManager.SDKDebug(Config.isRemovedAD().ToString()); AdShowControl.GameContinueCountNumber = 2; AdShowControl.CompleteRetryCountNumber = 2; AdShowControl.CompleteGameCountNumber = 3; }
void Start() { fileControl = GameObject.FindObjectOfType <FileControl>(); colorWheel = GameObject.FindObjectOfType <ColorWheelControl>(); sdkController = GameObject.FindObjectOfType <SDKController>(); if (isLocalPlayer) { _LocalPlayerInstance = this; sdkController.OnSaveSucceededEvent += SaveCSV; sdkController.OnLoadSucceededEvent += RetrieveFile; Color newColor = new Color(); newColor = colorWheel.Selection; CmdChangePlayerColor(newColor); } controllers.Add(this); }
void Awake() { FeedBackInstance = this; sdkController = FindObjectOfType <SDKController>(); }