public void InitGame() { SetPlayer(GameObject.Find("PlayerGo/CannonTower")); if (BackupCreateDcrOnceTime == -1f) { BackupCreateDcrOnceTime = CreateDcrOnceTime; } else { CreateDcrOnceTime = BackupCreateDcrOnceTime; } //GameOver(); DcrList = new List <GameObject>(); SetCoroutine(); UIContorl.InitUI(); PlayerUnit.PlayerInit(); SetMoney(0); SetKillCount(0); _DcrHp = (new UnitAttritube(AttritubeAccess.GetAttrDic("BigDcr"), typeof(UnitStaticAttritubeType))).GetFloat(UnitStaticAttritubeType.MaxHp); UISelectBuffContorl.HidendUI(); UISelectBuffContorl.InitBuffList(); }
protected virtual IAttritube LoadAttritube(string AttrName, Type type) { UnitAttritube attribute = new UnitAttritube(AttritubeAccess.GetAttrDic(AttrName), type); attribute.SetAttr(UnitDynamicAttritubeType.Hp, attribute.GetAttr(UnitStaticAttritubeType.MaxHp)); attribute.SetAttr(UnitDynamicAttritubeType.Mp, attribute.GetAttr(UnitStaticAttritubeType.MaxMp)); return(attribute); }
protected virtual IAttritube LoadAttritube(string AttrName, Type type) { return(new UnitAttritube(AttritubeAccess.GetAttrDic(AttrName), type)); }