예제 #1
0
    public ZhiboDanmuMgr(ZhiboGameMode gameMode)
    {
        this.gameMode = gameMode;
        mResLoader    = GameMain.GetInstance().GetModule <ResLoader>();

        InitUI();
    }
예제 #2
0
    public void Init(ZhiboGameMode gameMode, ZhiboBuffInfo buffInfo)
    {
        this.bInfo       = buffInfo;
        this.LeftTurn    = buffInfo.TurnLast;
        this.LeftCardNum = buffInfo.CardNum;
        this.gameMode    = gameMode;

        if (bInfo.TurnLast > 0)
        {
            BuffLastType |= (int)eBuffLastType.TURN_BASE;
        }
        if (bInfo.SecLast > 0)
        {
            BuffLastType |= (int)eBuffLastType.TIME_BASE;
        }
        if (bInfo.CardNum > 0)
        {
            BuffLastType |= (int)eBuffLastType.CARD_BASE;
        }



        if (buffInfo.filterString != null && buffInfo.filterString != string.Empty)
        {
            filter = CardFilter.parseFilterFromString(buffInfo.filterString);
        }
        BindView();
        RegisterEvent();
    }
예제 #3
0
    public void init(string txt, string type, ZhiboGameMode gameMode)
    {
        this.gameMode = gameMode;
        this.txt      = txt;
        rect          = (RectTransform)transform;
        anim          = GetComponent <Animator>();

        anim.Play("FadeIn");
        anim.ResetTrigger("anim");
        Activated = false;

        HasDisapeared = false;
        NeedDestroy   = false;

        destroying = false;

        HpLeft = 8;

        hengfuSize = txt.Length * 20 + 10;

        BindView();
        RegisterEvent();
        view.Content.text = txt;
        AdjustWidth();
    }
예제 #4
0
 public ZhiboEmergencyManager(ZhiboGameMode gameMode)
 {
     this.gameMode = gameMode;
     mResLoader    = GameMain.GetInstance().GetModule <ResLoader>();
     mUIMgr        = GameMain.GetInstance().GetModule <UIMgr>();
     InitEmergency();
 }
예제 #5
0
    public void Init(ZhiboGameMode gameMode)
    {
        rt            = (RectTransform)transform;
        Width         = rt.rect.width;
        this.gameMode = gameMode;
        R             = Width * 0.5f / Mathf.Sin(MaxDegree * 0.5f * Mathf.Deg2Rad);
        mResLoader    = GameMain.GetInstance().GetModule <ResLoader>();

        FixedContainer = transform.Find("FixedArea");
    }
예제 #6
0
    public void Init(string type, ZhiboGameMode gameMode)
    {
        this.type     = type;
        ClickNum      = 5;
        this.gameMode = gameMode;
        BindView();
        RegisterEvent();
        basicScaleRate = 1f;
        timer          = 0;
        preTween       = null;

        transform.localScale = Vector3.one;
    }
예제 #7
0
    public override void RegisterEvent()
    {
        base.RegisterEvent();
        view.OKBtn.onClick.AddListener(delegate {
            ZhiboGameMode gameMode = GameMain.GetInstance().GetModule <CoreManager>().GetGameMode() as ZhiboGameMode;
            Debug.Log(gameMode.mUICtrl == null);
            mUIMgr.CloseCertainPanel(gameMode.mUICtrl);
            mUIMgr.CloseCertainPanel(this);

            MainGMInitData data = new MainGMInitData();
            data.isNextTurn     = true;
            GameMain.GetInstance().GetModule <CoreManager>().ChangeScene("Main", data);
        });
    }
예제 #8
0
파일: Danmu.cs 프로젝트: DLBL0624/CSCI529
    public virtual void init(string txt, bool isBad, ZhiboGameMode gameMode)
    {
        rect          = (RectTransform)transform;
        this.isBad    = isBad;
        this.gameMode = gameMode;
        isBig         = false;

        anim        = GetComponent <Animator>();
        NeedDestroy = false;
        //spd = gameMode.state.DanmuSpd;
        strength = 1;
        left     = 1;


        //color = getRandomColor();
        BindView();
        RegisterEvent();

        anim.Play("Normal");
        destroying = false;

        if (isBad)
        {
            view.Content.color = Color.white;
            view.BadBG.gameObject.SetActive(true);
        }
        else
        {
            view.Content.color = Color.black;
            view.BadBG.gameObject.SetActive(false);
        }

        view.Content.fontSize               = 30;
        view.Content.fontSize              += Random.Range(0, 6);
        view.Hengfu.raycastTarget           = true;
        view.Content.text                   = txt;
        view.Hengfu.rectTransform.sizeDelta = new Vector2(txt.Length * view.Content.fontSize + 10, view.Hengfu.rectTransform.sizeDelta.y);
    }
예제 #9
0
 public ZhiboAudienceHpTempMgr(ZhiboGameMode gameMode)
 {
     this.gameMode = gameMode;
     mResLoader    = GameMain.GetInstance().GetModule <ResLoader>();
     InitRes();
 }
예제 #10
0
 public override void Init()
 {
     gameMode = GameMain.GetInstance().GetModule <CoreManager>().GetGameMode() as ZhiboGameMode;
 }
예제 #11
0
 public ZhiboBuffManager(ZhiboGameMode gameMode)
 {
     this.gameMode = gameMode;
     mResLoader    = GameMain.GetInstance().GetModule <ResLoader>();
     LoadBuff();
 }