feat: add invincibility to dash

This commit is contained in:
Renge 2022-04-20 13:57:11 -04:00
parent abebaf2615
commit 3e40298d4c

View File

@ -19,6 +19,7 @@ import AnimatedSprite from "../../Wolfie2D/Nodes/Sprites/AnimatedSprite";
import InputWrapper from "../Tools/InputWrapper";
import EnemyAI from "../AI/EnemyAI";
import Timer from "../../Wolfie2D/Timing/Timer";
import PlayerState from "./PlayerStates/PlayerState";
export enum PlayerType {
@ -108,7 +109,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
if (this.godMode) {
return;
}
if( !this.invincible){
if( !this.invincible && !PlayerState.dashTimer.isStopped()){
//i frame here
PlayerController.invincibilityTimer.start();
this.invincible = true;