From 3e40298d4cfb434028d89bdb76bdc66e2570bcf1 Mon Sep 17 00:00:00 2001 From: Renge Date: Wed, 20 Apr 2022 13:57:11 -0400 Subject: [PATCH] feat: add invincibility to dash --- src/shattered_sword/Player/PlayerController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shattered_sword/Player/PlayerController.ts b/src/shattered_sword/Player/PlayerController.ts index 3fbe227..788cb00 100644 --- a/src/shattered_sword/Player/PlayerController.ts +++ b/src/shattered_sword/Player/PlayerController.ts @@ -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;