public void SaveStatus() { try { coinText = PoolReference.TableScene[EnumInPool.CoinText.ToString()].GetComponent <Text>(); flyText = PoolReference.TableScene[EnumInPool.BonusFlyText.ToString()].GetComponent <Text>(); tm = PoolReference.TableScene[EnumInPool.TaskCanvas.ToString()].GetComponent <TaskManeger>(); SaveStats ss = new SaveStats(); ss.SaveStatistik(coinText.text, "Coin"); ss.SaveStatistik(flyText.text, "Fly"); if (tm.numTask > 1) { ss.SaveStatistik(tm.numTask.ToString(), "NumberTask"); } Debug.Log("Save Complite"); } catch { } PoolReference.TableScene.Clear(); //Очистка ключей }
public void TakeExit() { if (numTask > 1) { SaveStats ss = new SaveStats(); ss.SaveStatistik(numTask.ToString(), "NumberTask"); } Shop shop = poolr.shop; shop.simplePC.enabled = !shop.simplePC.enabled; poolr.GameCanvas.gameObject.SetActive(!poolr.GameCanvas.gameObject.activeSelf); //poolr.TaskCanvas.gameObject.SetActive(!poolr.TaskCanvas.gameObject.activeSelf); PoolReference.TableScene[EnumInPool.TaskCanvas.ToString()].SetActive( !PoolReference.TableScene[EnumInPool.TaskCanvas.ToString()].activeSelf ); //Debug.Log ("TakeExit()"); }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.CompareTag("Player")) { // Debug.Log("Save Position"); RT = other.gameObject.GetComponentInChildren <RectTransform>(); SaveStats savePosition = new SaveStats(); savePosition.SaveStatistik(RT.position); if (gameObject.GetComponent <SpawnManeger>()) { gameObject.GetComponent <SpawnManeger>().enabled = true; } if (gameObject.GetComponent <SpawnManeger1>()) { gameObject.GetComponent <SpawnManeger1>().enabled = true; } } }
public void SaveStatus() { try { coinText = PoolReference.TableScene[EnumInPool.CoinText.ToString()].GetComponent<Text>(); flyText = PoolReference.TableScene[EnumInPool.BonusFlyText.ToString()].GetComponent<Text>(); tm = PoolReference.TableScene[EnumInPool.TaskCanvas.ToString()].GetComponent<TaskManeger>(); SaveStats ss = new SaveStats(); ss.SaveStatistik( coinText.text, "Coin" ); ss.SaveStatistik( flyText.text, "Fly" ); if( tm.numTask > 1 ) ss.SaveStatistik( tm.numTask.ToString(), "NumberTask" ); Debug.Log( "Save Complite" ); } catch { } PoolReference.TableScene.Clear(); //Очистка ключей }