File tree 2 files changed +15
-4
lines changed
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ public override void SetWalkSpeed(float value)
44
44
public override void Jump ( ) { }
45
45
public override void Attack ( )
46
46
{
47
- Debug . LogWarning ( "Monster attack!" ) ;
48
47
if ( PlayAnimation ( ( int ) MonsterAnimationEvent . atk01 ) )
49
48
{
50
49
_animancerState . EffectiveSpeed = _atkSpdMultiplier ;
@@ -53,8 +52,22 @@ public override void Attack()
53
52
{
54
53
_animancerState . Events . Add ( AudioHandler . AtkRatio , ( ) => AudioHandler . PlayAtkSound ( ) ) ;
55
54
55
+ if ( _entityReferenceHolder . Gear . WeaponType == WeaponType . bow )
56
+ {
57
+ _animancerState . Events . Add ( _nockArrowRatio , ( ) =>
58
+ {
59
+ _entityReferenceHolder . Combat . NockArrow ( ) ;
60
+ AudioHandler . PlayBowBendSound ( ) ;
61
+ } ) ;
62
+
63
+ _animancerState . Events . Add ( _shootArrowRatio , ( ) =>
64
+ {
65
+ _entityReferenceHolder . Combat . ShootArrow ( ) ;
66
+ AudioHandler . PlayArrowShootSound ( ) ;
67
+ } ) ;
68
+ }
69
+
56
70
_animancerState . Events . OnEnd += Wait ;
57
- //TODO: Detect if monster has a bow ?
58
71
}
59
72
}
60
73
}
@@ -79,7 +92,6 @@ public override void Run()
79
92
80
93
public override void Wait ( )
81
94
{
82
- Debug . LogWarning ( "Monster Wait!" ) ;
83
95
if ( AtkWait ( ) )
84
96
{
85
97
return ;
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ public override void PlaySound(EntitySoundEvent soundEvent)
43
43
44
44
public void PlayAtkSound ( )
45
45
{
46
- Debug . LogWarning ( "Monster Play atk sound" ) ;
47
46
PlaySound ( EntitySoundEvent . Atk ) ;
48
47
}
49
48
You can’t perform that action at this time.
0 commit comments