public void LoadTxt(StreamReader sr)
        {
            var line = TxtManager.ReadUntilValue(sr);

            Assert.IsFalse(string.IsNullOrEmpty(line));
            Init(line);
        }
예제 #2
0
        /// <summary>
        /// 注册灵器
        /// </summary>
//		void RegisterSpiritItem()
//		{
//			AbstractSpiritItem.RegisterSpiritItem<TestSpirit>(SpiritName.C_First);
//			AbstractSpiritItem.RegisterSpiritItem<TestSpirit>(SpiritName.C_Second);
//		}

        /// <summary>
        /// 注册Data工厂
        /// </summary>
        void RegisterData()
        {
            TxtManager.RegisterDataFactory <L1Rank>(TxtSign.L1Rank);
            TxtManager.RegisterDataFactory <L2Rank>(TxtSign.L2Rank);
            TxtManager.RegisterDataFactory <S1Rank>(TxtSign.S1Rank);
            TxtManager.RegisterDataFactory <S2Rank>(TxtSign.S2Rank);
        }
        public void LoadTxt(StreamReader sr)
        {
//            Debug.Log(this.SkillType + " Main");
            var line = TxtManager.ReadUntilValue(sr);

            Assert.IsFalse(string.IsNullOrEmpty(line));
            LoadTxt(line);
//            Debug.Log(this.SkillType+" end Main");
        }
        public void LoadTxt(StreamReader sr)
        {
            var line = TxtManager.ReadUntilValue(sr);

            if (string.IsNullOrEmpty(line))
            {
                Debug.LogWarning("rankinfo is null");
                return;
            }
            LoadTxt(line);
        }
예제 #5
0
        public void LoadTxt(StreamReader sr)
        {
            do
            {
                var smallRank = TxtManager.LoadData(sr) as AbstractSmallRank;
                //throw new Exception(sr.ReadLine());
                if (smallRank == null)
                {
//                    Debug.LogWarning("trigger is null");
                    break;
                }

                this.smallRanks.Add(smallRank);
            } while (true);
        }
예제 #6
0
    /// <summary>
    /// 从文件中加载数据
    /// </summary>
    void LoadDataFromFile()
    {
        TxtManager.LoadDataFromFile <AbstractLargeRank>(FilePath.RankFilePath,
                                                        (largeRank) => { RankMgr.LargeRankList.Add(largeRank); });

        TxtManager.LoadDataFromFile <SkillInstance>(FilePath.SkillFilePath,
                                                    (skillInstance) => { SkillTriggerMgr.skillInstanceDic.Add(skillInstance.name, skillInstance); });

        TxtManager.LoadDataFromFile <AbstractItem>(FilePath.ItemFilePath,
                                                   (item) => { ItemMgr.itemDic.Add(item.ID, item); });
//
//		foreach (var v in RankMgr.LargeRankList)
//		{
//			Debug.Log(v.name);
//		}
    }
예제 #7
0
        public void LoadTxt(StreamReader sr)
        {
//            Debug.Log(this.name + " Main");
            do
            {
                var trigger = TxtManager.LoadData(sr) as AbstractSkillTrigger;
                //throw new Exception(sr.ReadLine());
                if (trigger == null)
                {
//                    Debug.LogWarning("trigger is null");
                    break;
                }

                this.AddTrigger(trigger);
            } while (true);
//            Debug.Log(this.name+" end Main");
        }
예제 #8
0
    /// <summary>
    /// 注册Data工厂
    /// </summary>
    void RegisterData()
    {
        TxtManager.RegisterDataFactory <ShitItem>(TxtSign.shitItem);
        TxtManager.RegisterDataFactory <BoxItem>(TxtSign.boxItem);

        TxtManager.RegisterDataFactory <SkillInstance>(TxtSign.skill);

        TxtManager.RegisterDataFactory <L1Rank>(TxtSign.L1Rank);
        TxtManager.RegisterDataFactory <L2Rank>(TxtSign.L2Rank);
        TxtManager.RegisterDataFactory <S1Rank>(TxtSign.S1Rank);
        TxtManager.RegisterDataFactory <S2Rank>(TxtSign.S2Rank);

        TxtManager.RegisterDataFactory <AnimationTrigger>(TxtSign.animation);
        TxtManager.RegisterDataFactory <InstantRayDamageTrigger>(TxtSign.instantDamage);
        TxtManager.RegisterDataFactory <AudioTrigger>(TxtSign.audio);
        TxtManager.RegisterDataFactory <DashTrigger>(TxtSign.dash);
        TxtManager.RegisterDataFactory <DirectLineBulletTrigger>(TxtSign.bullet);
        TxtManager.RegisterDataFactory <SwordTrigger>(TxtSign.trigger2D);
        TxtManager.RegisterDataFactory <ParabloaBulletTrigger>(TxtSign.paraBullet);
    }
예제 #9
0
 /// <summary>
 /// 从文件中加载数据
 /// </summary>
 void LoadDataFromFile()
 {
     TxtManager.LoadDataFromFile <AbstractLargeRank>(FilePath.RankFilePath,
                                                     (largeRank) => { RankMgr.LargeRankList.Add(largeRank); });
 }