.. | .. |
---|
543 | 543 | |
---|
544 | 544 | void SoftTouch() |
---|
545 | 545 | { |
---|
546 | | - super.SoftTouch(); |
---|
547 | | - for (int i = 0; i < Children().size(); i++) |
---|
| 546 | + if (blockloop) |
---|
548 | 547 | { |
---|
549 | | - Object3D obj = (Object3D) Children().reserve(i); |
---|
550 | | - |
---|
551 | | - if (obj == null) |
---|
552 | | - continue; |
---|
553 | | - |
---|
554 | | - if (obj.material == null) |
---|
555 | | - { |
---|
556 | | - obj.SoftTouch(); |
---|
557 | | - } |
---|
558 | | - Children().release(i); |
---|
| 548 | + return; |
---|
559 | 549 | } |
---|
| 550 | + |
---|
| 551 | + blockloop = true; |
---|
| 552 | + |
---|
| 553 | + super.SoftTouch(); |
---|
| 554 | + |
---|
| 555 | + for (int i = 0; i < Size(); i++) |
---|
| 556 | + { |
---|
| 557 | + Object3D child = (Object3D) get(i); |
---|
| 558 | + if (child == null) |
---|
| 559 | + continue; |
---|
| 560 | + if (child.material == null) |
---|
| 561 | + { |
---|
| 562 | + child.SoftTouch(); |
---|
| 563 | + } |
---|
| 564 | + } |
---|
| 565 | + |
---|
| 566 | + blockloop = false; |
---|
560 | 567 | } |
---|
561 | 568 | |
---|
562 | 569 | void HardTouch() |
---|
563 | 570 | { |
---|
564 | | - super.HardTouch(); |
---|
565 | | - for (int i = 0; i < Children().size(); i++) |
---|
| 571 | + if (blockloop) |
---|
566 | 572 | { |
---|
567 | | - Object3D child = (Object3D) Children().reserve(i); |
---|
| 573 | + return; |
---|
| 574 | + } |
---|
| 575 | + |
---|
| 576 | + blockloop = true; |
---|
| 577 | + |
---|
| 578 | + super.HardTouch(); |
---|
| 579 | + |
---|
| 580 | + for (int i = 0; i < Size(); i++) |
---|
| 581 | + { |
---|
| 582 | + Object3D child = (Object3D) get(i); |
---|
568 | 583 | if (child == null) |
---|
569 | 584 | continue; |
---|
570 | 585 | child.HardTouch(); |
---|
571 | | - Children().release(i); |
---|
572 | 586 | } |
---|
| 587 | + |
---|
| 588 | + blockloop = false; |
---|
573 | 589 | } |
---|
574 | 590 | |
---|
575 | 591 | // void ClearMaterial() |
---|