Пример #1
0
    public void Init(Transform root, ZhiboUI zhiboUI)
    {
        this.zhiboUI = zhiboUI;
        this.root    = (RectTransform)root;

        animator = GetComponent <Animator>();
        animator.Play("Empty");
        //animator.ResetTrigger("");
        content = transform.GetChild(0).GetComponent <Image>();
    }
Пример #2
0
    public override void Init()
    {
        mUIMgr     = GameMain.GetInstance().GetModule <UIMgr>();
        mResLoader = GameMain.GetInstance().GetModule <ResLoader>();
        mCardMdl   = GameMain.GetInstance().GetModule <CardDeckModule>();
        pRoleMgr   = GameMain.GetInstance().GetModule <RoleModule>();

        state = new ZhiboGameState();

        state.stats    = new RoleStats(pRoleMgr.GetStats());
        state.BadLevel = pRoleMgr.GetBadLevel();



        state.ZhiboBuffs.Clear();
        state.Cards.Clear();
        state.Danmus.Clear();

        mBuffManager      = new ZhiboBuffManager(this);
        mEmergencyManager = new ZhiboEmergencyManager(this);

        state.TurnLeft     = 12;
        state.TurnTimeLeft = 30f;

        state.Score    = 0;
        state.MaxScore = 100;

        state.Qifen = 300;
        state.Tili  = 10;

        spdRate     = 1.0f;
        lastTick    = 0;
        nextTick    = 0;
        bigOneNext  = 3;
        bigOneCount = 0;

        LoadDanmuDict();
        LoadCard();
        mUICtrl = mUIMgr.ShowPanel("ZhiboPanel") as ZhiboUI;

        //NextTurn();
        NextTurnCaller();
    }