feat: add invincibility to dash
This commit is contained in:
		
							parent
							
								
									abebaf2615
								
							
						
					
					
						commit
						3e40298d4c
					
				| 
						 | 
					@ -19,6 +19,7 @@ import AnimatedSprite from "../../Wolfie2D/Nodes/Sprites/AnimatedSprite";
 | 
				
			||||||
import InputWrapper from "../Tools/InputWrapper";
 | 
					import InputWrapper from "../Tools/InputWrapper";
 | 
				
			||||||
import EnemyAI from "../AI/EnemyAI";
 | 
					import EnemyAI from "../AI/EnemyAI";
 | 
				
			||||||
import Timer from "../../Wolfie2D/Timing/Timer";
 | 
					import Timer from "../../Wolfie2D/Timing/Timer";
 | 
				
			||||||
 | 
					import PlayerState from "./PlayerStates/PlayerState";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export enum PlayerType {
 | 
					export enum PlayerType {
 | 
				
			||||||
| 
						 | 
					@ -108,7 +109,7 @@ export default class PlayerController extends StateMachineAI implements BattlerA
 | 
				
			||||||
        if (this.godMode) {
 | 
					        if (this.godMode) {
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if( !this.invincible){
 | 
					        if( !this.invincible && !PlayerState.dashTimer.isStopped()){
 | 
				
			||||||
            //i frame here
 | 
					            //i frame here
 | 
				
			||||||
            PlayerController.invincibilityTimer.start();
 | 
					            PlayerController.invincibilityTimer.start();
 | 
				
			||||||
            this.invincible = true;
 | 
					            this.invincible = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user