Exemple #1
0
        public void renderUpdate(int front)
        {
            MySprite.Instance.put(front, ref location_rect_, MySprite.Kind.Location, MySprite.Type.Half);
            MySprite.Instance.put(front, ref maxlockon_rect_, MySprite.Kind.MaxLockon, MySprite.Type.Half);

            // lockon gauge
            int lock_num   = LockTarget.getCurrentLockNum();
            int fired_num  = LockTarget.getCurrentFiredNum();
            int charge_num = lock_num - fired_num;
            int idx        = 0;

            for (var i = 0; i < gauge_rect_L_list_.Length; ++i)
            {
                MySprite.Kind kind = (idx < charge_num ? MySprite.Kind.GaugeRL : MySprite.Kind.GaugeBL);
                MySprite.Instance.put(front, ref gauge_rect_L_list_[i], kind, MySprite.Type.Half);
                ++idx;
            }
            for (var i = 0; i < gauge_rect_M_list_.Length; ++i)
            {
                MySprite.Kind kind = (idx < charge_num ? MySprite.Kind.GaugeRM : MySprite.Kind.GaugeBM);
                MySprite.Instance.put(front, ref gauge_rect_M_list_[i], kind, MySprite.Type.Half);
                ++idx;
            }
            for (var i = 0; i < gauge_rect_S_list_.Length; ++i)
            {
                MySprite.Kind kind = (idx < charge_num ? MySprite.Kind.GaugeRS : MySprite.Kind.GaugeBS);
                MySprite.Instance.put(front, ref gauge_rect_S_list_[i], kind, MySprite.Type.Half);
                ++idx;
            }

            // unitychan
            if (unitychan_width_ratio_ > 0f)
            {
                var rect = new Rect(unitychan_rect_.x,
                                    unitychan_rect_.y,
                                    unitychan_rect_.width * unitychan_width_ratio_,
                                    unitychan_rect_.height * unitychan_height_ratio_);
                MySprite.Instance.put(front, ref rect, unitychan_kind_, MySprite.Type.Full);
            }

            // weapon & damage
            MySprite.Instance.put(front, ref weapon_rect_, MySprite.Kind.Weapon, MySprite.Type.Half);
            if (damage_mark_on_)
            {
                var rect = weapon_rect_;
                rect.x     += damage_mark_position_.x;
                rect.y     += damage_mark_position_.y;
                rect.width  = 32f;
                rect.height = 32f;
                MySprite.Instance.put(front, ref rect, MySprite.Kind.DamageMark, MySprite.Type.GuardMark);
            }
        }