doc can not attack during intro
parent
071c3b71d0
commit
c5ee27ec7f
|
@ -599,6 +599,7 @@ InitialState = NodePath("Telegraph")
|
|||
[node name="Intro" type="Node" parent="BossStateMachine" node_paths=PackedStringArray("NextState", "NPC")]
|
||||
script = ExtResource("11_lt771")
|
||||
NextState = NodePath("../Telegraph")
|
||||
Duration = 3.0
|
||||
NPC = NodePath("../..")
|
||||
|
||||
[node name="Telegraph" type="Node" parent="BossStateMachine" node_paths=PackedStringArray("TelegraphAnimationPlayer", "AttackState", "NPC")]
|
||||
|
@ -637,6 +638,7 @@ NPC = NodePath("../..")
|
|||
[node name="LanceIntro" type="Node" parent="BossStateMachine" node_paths=PackedStringArray("NextState", "NPC")]
|
||||
script = ExtResource("11_lt771")
|
||||
NextState = NodePath("../Lance")
|
||||
Duration = 3.0
|
||||
NPC = NodePath("../..")
|
||||
|
||||
[node name="Lance" type="Node" parent="BossStateMachine" node_paths=PackedStringArray("ExitState", "NPC")]
|
||||
|
|
|
@ -23,9 +23,16 @@ public partial class DocIntroState : NPCState
|
|||
{
|
||||
_currentDuration = Duration;
|
||||
_doc.MiscAnimation.Play("intro");
|
||||
_doc.CanAttack = false;
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void Exit(IState<NPCState> nextState)
|
||||
{
|
||||
_doc.CanAttack = true;
|
||||
base.Exit(nextState);
|
||||
}
|
||||
|
||||
public override NPCState Process(double delta)
|
||||
{
|
||||
if ((_currentDuration -= delta) <= 0)
|
||||
|
|
Loading…
Reference in New Issue