當前位置: 首頁>>代碼示例>>Java>>正文


Java Beatmap類代碼示例

本文整理匯總了Java中lt.ekgame.bancho.api.units.Beatmap的典型用法代碼示例。如果您正苦於以下問題:Java Beatmap類的具體用法?Java Beatmap怎麽用?Java Beatmap使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Beatmap類屬於lt.ekgame.bancho.api.units包,在下文中一共展示了Beatmap類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BeatmapHandler

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public BeatmapHandler(String folder) {
	File beatmapFolder = new File(folder);
	if (beatmapFolder.exists() && beatmapFolder.isDirectory()) {
		File[] files = beatmapFolder.listFiles(i -> i.getName().toLowerCase().endsWith("osu"));
		for (File file : files) {
			try {
				Beatmap beatmap = new Beatmap(file);
				beatmaps.add(beatmap);
			}
			catch (Exception e) {
				System.err.println("Failed to load " + file.getName());
			}
		}
	}
}
 
開發者ID:ekgame,項目名稱:osu-auto-host,代碼行數:16,代碼來源:BeatmapHandler.java

示例2: recentlyPlayed

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public boolean recentlyPlayed(Beatmap check, int recentness) {
	int i = 0;
	for (Beatmap beatmap : completed) {
		if (beatmap.getChecksum().toLowerCase().equals(check.getChecksum().toLowerCase()))
			if (completed.size() - i < recentness)
				return true;
		i++;
	}
	return false;
}
 
開發者ID:ekgame,項目名稱:osu-auto-host,代碼行數:11,代碼來源:BeatmapHandler.java

示例3: inQueue

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public boolean inQueue(Beatmap check) {
	if (current != null && current.getChecksum().toLowerCase().equals(check.getChecksum().toLowerCase()))
		return true;
	for (Beatmap beatmap : beatmaps) {
		if (beatmap.getChecksum().toLowerCase().equals(check.getChecksum().toLowerCase()))
			return true;
	}
	return false;
}
 
開發者ID:ekgame,項目名稱:osu-auto-host,代碼行數:10,代碼來源:BeatmapHandler.java

示例4: onBeatmapChange

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void onBeatmapChange() {
	resetVoteSkip();
	timer.resetTimer();
	Beatmap beatmap = bot.beatmaps.getBeatmap();
	if (beatmap == null) {
		bot.bancho.sendMessage("#multiplayer", "No more beatmaps in the queue. Use !add [link to beatmap] to add more beatmaps.");
	} else {
		bot.bancho.sendMessage("#multiplayer", String.format("Up next: %s - %s [%s] mapped by %s.", 
				beatmap.getArtist(), beatmap.getTitle(), beatmap.getVersion(), beatmap.getCreator()));
	}
}
 
開發者ID:ekgame,項目名稱:osu-auto-host,代碼行數:12,代碼來源:RoomHandler.java

示例5: onBeatmapAdded

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void onBeatmapAdded(Beatmap beatmap) {
	bot.bancho.sendMessage("#multiplayer", String.format("Added %s - %s [%s] mapped by %s",
			beatmap.getArtist(), beatmap.getTitle(), beatmap.getVersion(), beatmap.getCreator()));
	if (bot.beatmaps.getBeatmap() == null) {
		MultiplayerHandler mp = bot.bancho.getMultiplayerHandler();
		mp.setBeatmap(bot.beatmaps.nextBeatmap());
	}
}
 
開發者ID:ekgame,項目名稱:osu-auto-host,代碼行數:9,代碼來源:RoomHandler.java

示例6: PacketStatusUpdate

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public PacketStatusUpdate(UserState status, Beatmap beatmap, Mods mods, Playmode playmode) {
	this(status, beatmap.getName(), beatmap.getChecksum(), mods, playmode, 0);
}
 
開發者ID:ekgame,項目名稱:bancho-api,代碼行數:4,代碼來源:PacketStatusUpdate.java

示例7: setBeatmap

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public StatusBuilder setBeatmap(Beatmap beatmap) {
	this.beatmap = beatmap;
	return this;
}
 
開發者ID:ekgame,項目名稱:bancho-api,代碼行數:5,代碼來源:StatusBuilder.java

示例8: setBeatmap

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void setBeatmap(Beatmap beatmap) {
	if (isHost()) {
		currentRoom.setBeatmap(beatmap == null ? Beatmap.DEFAULT : beatmap);
		sendRoomUpdate();
	}
}
 
開發者ID:ekgame,項目名稱:bancho-api,代碼行數:7,代碼來源:MultiplayerHandler.java

示例9: StatusImpl

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public StatusImpl(Beatmap beatmap, UserState state, Playmode playmode, Mods mods) {
	this.beatmap = beatmap;
	this.state = state;
	this.playmode = playmode;
	this.mods = mods;
}
 
開發者ID:ekgame,項目名稱:bancho-api,代碼行數:7,代碼來源:StatusImpl.java

示例10: getBeatmap

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
@Override
public Beatmap getBeatmap() {
	return beatmap;
}
 
開發者ID:ekgame,項目名稱:bancho-api,代碼行數:5,代碼來源:StatusImpl.java

示例11: nextBeatmap

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public Beatmap nextBeatmap() {
	if (current != null)
		completed.add(current);
	current = beatmaps.poll();
	return current;
}
 
開發者ID:ekgame,項目名稱:osu-auto-host,代碼行數:7,代碼來源:BeatmapHandler.java

示例12: getBeatmap

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public Beatmap getBeatmap() {
	return current;
}
 
開發者ID:ekgame,項目名稱:osu-auto-host,代碼行數:4,代碼來源:BeatmapHandler.java

示例13: push

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void push(Beatmap beatmap) {
	beatmaps.add(beatmap);
}
 
開發者ID:ekgame,項目名稱:osu-auto-host,代碼行數:4,代碼來源:BeatmapHandler.java

示例14: setCurrentBeatmap

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public void setCurrentBeatmap(Beatmap beatmap) {
	currentBeatmap = beatmap;
}
 
開發者ID:ekgame,項目名稱:bancho-client,代碼行數:4,代碼來源:ClientHandler.java

示例15: getCurrentBeatmap

import lt.ekgame.bancho.api.units.Beatmap; //導入依賴的package包/類
public Beatmap getCurrentBeatmap() {
	return currentBeatmap;
}
 
開發者ID:ekgame,項目名稱:bancho-client,代碼行數:4,代碼來源:ClientHandler.java


注:本文中的lt.ekgame.bancho.api.units.Beatmap類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。