示例#1
0
        // 添加一个 bubble 到队列中.
        public void AdddBubble2List(int _mul, int _value, Vector3 _pos, Quaternion _rot, bool _upsideDown)
        {
            if (Time.time > targetBubbleShowUpTime)
            {
                targetBubbleShowUpTime = Time.time;
            }

            BubbleParam _b = new BubbleParam();

            _b.mul   = _mul;
            _b.value = _value;
            _b.pos   = _pos;
            // 如果玩家炮台需要旋转,则调整泡泡上数字显示的方向
            if (CanonCtrl.Instance.turn_screen == true && CanonCtrl.Instance.turn_screen_on_of)
            {
                _b.rot = new Quaternion(0.0f, 0.0f, 1.0f, 0.0f);
            }
            else
            {
                _b.rot = _rot;
            }
            _b.upsideDown = _upsideDown;

            bubbleList.Add(_b);
        }
示例#2
0
        // 创建 bubble.
        void CreateFishBubble(BubbleParam _b)
        {
            Transform _bubble = Factory.Create(fishBubbleNum, _b.pos, _b.rot);

            // 暴力初始化SingleBubbleNum脚本数据,消除泡泡个位和十位数字颠倒bug.
            _bubble.GetComponent <SingleBubbleNum>().Init(0, 0, false);
            _bubble.GetComponent <SingleBubbleNum>().Init(_b.mul, _b.value, _b.upsideDown);
            _bubble.parent     = numCache;
            _bubble.localScale = Vector3.one;
        }