public ShotLogic(int row, int column, int direction, string charClass) { this.shot = new PlayerCharacter("shot"); this.charClass = charClass; this.shot.IsProjectile = true; this.shot.Position.Row = row; this.shot.Position.Column = column; this.shot.Direction = direction; }
public static bool CollisionDetect(Character entity, PlayerCharacter hero) { if ( (hero.Position.Column == entity.Position.Column + 1 && hero.Position.Row == entity.Position.Row) || (hero.Position.Column == entity.Position.Column - 1 && hero.Position.Row == entity.Position.Row) || (hero.Position.Column == entity.Position.Column && hero.Position.Row == entity.Position.Row + 1) || (hero.Position.Column == entity.Position.Column && hero.Position.Row == entity.Position.Row - 1) ) { return true; } return false; }