소스 검색

When AnimatedSprite2D creates new sprite components, use the AnimatedSprite2D's enabled status. Closes #678.

Lasse Öörni 10 년 전
부모
커밋
b55321fc40
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      Source/Urho3D/Urho2D/AnimatedSprite2D.cpp

+ 3 - 0
Source/Urho3D/Urho2D/AnimatedSprite2D.cpp

@@ -327,7 +327,10 @@ void AnimatedSprite2D::SetAnimation(Animation2D* animation, LoopMode2D loopMode)
 
             // Create StaticSprite2D component
             if (track.hasSprite_)
+            {
                 staticSprite = trackNode->CreateComponent<StaticSprite2D>();
+                staticSprite->SetEnabled(IsEnabledEffective());
+            }
         }
 
         if (staticSprite)