//作成可能なキャラ数 void Start() { //ゲームのセーブロード SaveDataBase.loadData(); int createChara = 0; //初回か? if (SaveDataBase.GetSamurai_All() == 0) { //初期化 SaveDataBase.InitSaveData(); createChara = (int)SaveDataBase.GetSamuraiNum(); //初回タイマー保存 SaveDataBase.SetClose_Timer(); } else { //アプリ終了前に徘徊している侍 createChara = SaveDataBase.GetSamuraiNum(); } CharacterManager.getInstance().characterAdd(createChara); //ステータス表示の更新 UIStatus.getInstance().upDataText(); }
// Use this for initialization void Awake() { // SaveDataを開く SaveDataBase.loadData(); iClearFlag = DataBase.PLAY; //iClearFlag = 0; this.STAR_COUNT = 0; this.bNekomaruObj.SetActive(true); this.bStageClearObj.SetActive(false); this.bStageClearEfectObj.SetActive(false); this.bStageMissObj.SetActive(false); //クリア時の星の表示(星を未取得の設定) ImgStar1.color = new Color(200 / 255f, 200 / 255f, 200 / 255f, 113 / 255f); ImgStar2.color = new Color(200 / 255f, 200 / 255f, 200 / 255f, 113 / 255f); ImgStar3.color = new Color(200 / 255f, 200 / 255f, 200 / 255f, 113 / 255f); textStage.text = "Level " + LoadStage.now_stage; main = this; Debug.Log("LoadStage.nowStage:" + LoadStage.now_stage + "DataBase.nowStage:" + DataBase.nowStage + "openLevel:" + DataBase.openLevel); }
// Use this for initialization void Awake() { // SaveDataを開く SaveDataBase.loadData(); Debug.Log("解放したレベル:" + DataBase.openLevel); for (int i = 0; i < 10; i++) { if (i < DataBase.openLevel) { level [i].SetActive(true); } else { level [i].SetActive(false); } } int star = 0; for (int i = 0; i < DataBase.openLevel; i++) { star += DataBase.level_star [i]; } starsAll_text.text = star + "/30"; }
public void Awake() { // SaveDataを開く SaveDataBase.loadData(); starsObtained = DataBase.level_star [stage_no - 1]; Debug.Log("level:" + stage_no + " star:" + starsObtained); ImgStar1.color = new Color(255 / 255f, 0 / 255f, 0 / 255f); ImgStar2.color = new Color(255 / 255f, 0 / 255f, 0 / 255f); ImgStar3.color = new Color(255 / 255f, 0 / 255f, 0 / 255f); for (int i = 0; i < 3; i++) { switch (i) { case 0: if (1 <= starsObtained) { ImgStar1.color = new Color(254 / 255f, 207 / 255f, 88 / 255f); } else { ImgStar1.color = new Color(0 / 255f, 0 / 255f, 0 / 255f, 70 / 255f); } break; case 1: if (2 <= starsObtained) { ImgStar2.color = new Color(254 / 255f, 207 / 255f, 88 / 255f); } else { ImgStar2.color = new Color(0 / 255f, 0 / 255f, 0 / 255f, 70 / 255f); } break; case 2: if (3 <= starsObtained) { ImgStar3.color = new Color(254 / 255f, 207 / 255f, 88 / 255f); } else { ImgStar3.color = new Color(0 / 255f, 0 / 255f, 0 / 255f, 70 / 255f); } break; } } }