@@ -42,7 +42,7 @@ public partial class Ally : CharacterBody2D
4242 [ Export ] public VisibleForAI [ ] AlwaysVisible = [ ] ;
4343 private GenerativeAI . Methods . ChatSession ? _chat ;
4444 private GeminiService ? _geminiService ;
45- [ Export ] public AnimationPlayer _animPlayer = null ! ;
45+ [ Export ] public AnimationPlayer AnimPlayer = null ! ;
4646 private PointLight2D _coreLight = null ! ;
4747
4848 private PointLight2D _torch = null ! ;
@@ -117,8 +117,8 @@ public override void _Ready()
117117 GD . PrintErr ( "PathFindingMovement node is not assigned in the editor!" ) ;
118118 }
119119 Chat . ResponseReceived += HandleResponse ;
120- _animPlayer = GetNode < AnimationPlayer > ( "AnimationPlayer2" ) ;
121- _animPlayer . Play ( "Idle-Left" ) ;
120+ AnimPlayer = GetNode < AnimationPlayer > ( "AnimationPlayer2" ) ;
121+ AnimPlayer . Play ( "Idle-Left" ) ;
122122
123123 RunBeginning ( ) ;
124124 }
@@ -186,21 +186,21 @@ public void SetAllyInDarkness()
186186
187187 }
188188
189- private void playPlayerAnimation ( )
189+ private void PlayPlayerAnimation ( )
190190 {
191191 if ( PathFindingMovement . CurrentDirection == PathFindingMovement . WalkingState . Left )
192192 {
193- _animPlayer . Play ( "Walk-Left" ) ;
193+ AnimPlayer . Play ( "Walk-Left" ) ;
194194 }
195195 else if ( PathFindingMovement . CurrentDirection == PathFindingMovement . WalkingState . Right )
196196 {
197- _animPlayer . Play ( "Walk-Right" ) ;
197+ AnimPlayer . Play ( "Walk-Right" ) ;
198198 }
199199 else if ( PathFindingMovement . CurrentDirection == PathFindingMovement . WalkingState . IdleLeft )
200200 {
201- _animPlayer . Play ( "Idle-Left" ) ;
201+ AnimPlayer . Play ( "Idle-Left" ) ;
202202 }
203- else { _animPlayer . Play ( "Idle-Right" ) ; }
203+ else { AnimPlayer . Play ( "Idle-Right" ) ; }
204204 }
205205
206206 private bool _hasSeenOtherAlly = false ;
@@ -240,9 +240,9 @@ public override void _PhysicsProcess(double delta)
240240
241241 if ( ! AnimationIsAlreadyPlaying )
242242 {
243- playPlayerAnimation ( ) ;
243+ PlayPlayerAnimation ( ) ;
244244 }
245- else if ( ! _animPlayer . IsPlaying ( ) )
245+ else if ( ! AnimPlayer . IsPlaying ( ) )
246246 {
247247 AnimationIsAlreadyPlaying = false ;
248248 }
0 commit comments