本文整理匯總了TypeScript中action/ActionExecutor.get函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript get函數的具體用法?TypeScript get怎麽用?TypeScript get使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了get函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: cloneDoodad
@Bound
private async cloneDoodad() {
const teleportLocation = await this.DEBUG_TOOLS.selector.select();
if (!teleportLocation) return;
ActionExecutor.get(Clone).execute(localPlayer, this.doodad!, new Vector3(teleportLocation, localPlayer.z));
}
示例2: changeTerrain
@Bound
private changeTerrain(_: any, terrain: TerrainType) {
if (terrain === TileHelpers.getType(this.tile)) {
return;
}
ActionExecutor.get(ChangeTerrain).execute(localPlayer, terrain, this.position);
this.update(this.position, this.tile);
}
示例3: unlockRecipes
@Bound
private async unlockRecipes() {
const confirm = await this.api.interrupt(translation(DebugToolsTranslation.InterruptConfirmationUnlockRecipes))
.withDescription(translation(DebugToolsTranslation.InterruptConfirmationUnlockRecipesDescription))
.withConfirmation();
if (!confirm) return;
ActionExecutor.get(UnlockRecipes).execute(localPlayer);
}
示例4: setGrowthStage
@Bound
private async setGrowthStage() {
const growthStage = await new EnumContextMenu(this.api, GrowingStage)
.setTranslator(stage => Doodad.getGrowingStageTranslation(stage, this.doodad!.description())!.inContext(TextContext.Title))
.setSort(EnumSort.Id)
.waitForChoice();
if (growthStage === undefined) {
return;
}
ActionExecutor.get(SetGrowingStage).execute(localPlayer, this.doodad!, growthStage);
}
示例5: spawnCreatureLine
@Bound
private spawnCreatureLine() {
ActionExecutor.get(SpawnCreatureLine).execute(localPlayer);
}
示例6: setDifficulty
private setDifficulty(difficulty: Difficulty) {
ActionExecutor.get(SetDifficulty).execute(localPlayer, difficulty);
}
示例7: toggleFreezeCreatures
private toggleFreezeCreatures(freezed: boolean) {
ActionExecutor.get(ToggleCreaturesFrozen).execute(localPlayer, freezed);
}
示例8: removeCreature
@Bound
private removeCreature() {
ActionExecutor.get(Remove).execute(localPlayer, this.creature!);
}
示例9: toggleInvulnerable
@Bound
private toggleInvulnerable(_: any, invulnerable: boolean) {
if (this.DEBUG_TOOLS.getPlayerData(this.player!, "invulnerable") === invulnerable) return;
ActionExecutor.get(ToggleInvulnerable).execute(localPlayer, this.player!, invulnerable);
}
示例10: toggleLighting
@Bound
private toggleLighting(_: any, lighting: boolean) {
this.DEBUG_TOOLS.setPlayerData(localPlayer, "lighting", lighting);
ActionExecutor.get(UpdateStatsAndAttributes).execute(localPlayer, localPlayer);
game.updateView(RenderSource.Mod, true);
}