本文整理汇总了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));
}
开发者ID:WaywardGame,项目名称:developertools,代码行数:7,代码来源:Doodad.ts
示例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);
}
开发者ID:WaywardGame,项目名称:developertools,代码行数:9,代码来源:Terrain.ts
示例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);
}
开发者ID:WaywardGame,项目名称:developertools,代码行数:10,代码来源:GeneralPanel.ts
示例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);
}
开发者ID:WaywardGame,项目名称:developertools,代码行数:13,代码来源:Doodad.ts
示例5: spawnCreatureLine
@Bound
private spawnCreatureLine() {
ActionExecutor.get(SpawnCreatureLine).execute(localPlayer);
}
开发者ID:WaywardGame,项目名称:balancingtools,代码行数:4,代码来源:BalancingToolsPanel.ts
示例6: setDifficulty
private setDifficulty(difficulty: Difficulty) {
ActionExecutor.get(SetDifficulty).execute(localPlayer, difficulty);
}
开发者ID:WaywardGame,项目名称:balancingtools,代码行数:3,代码来源:BalancingToolsPanel.ts
示例7: toggleFreezeCreatures
private toggleFreezeCreatures(freezed: boolean) {
ActionExecutor.get(ToggleCreaturesFrozen).execute(localPlayer, freezed);
}
开发者ID:WaywardGame,项目名称:balancingtools,代码行数:3,代码来源:BalancingToolsPanel.ts
示例8: removeCreature
@Bound
private removeCreature() {
ActionExecutor.get(Remove).execute(localPlayer, this.creature!);
}
开发者ID:WaywardGame,项目名称:developertools,代码行数:4,代码来源:Creature.ts
示例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);
}
开发者ID:WaywardGame,项目名称:developertools,代码行数:6,代码来源:Player.ts
示例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);
}
开发者ID:WaywardGame,项目名称:developertools,代码行数:6,代码来源:DisplayPanel.ts
注:本文中的action/ActionExecutor.get函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论