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


TypeScript ActionExecutor.get函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。