Пример #1
0
    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();
    }
Пример #2
0
    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);
    }
Пример #3
0
 protected virtual IAttritube LoadAttritube(string AttrName, Type type)
 {
     return(new UnitAttritube(AttritubeAccess.GetAttrDic(AttrName), type));
 }