private void Start() { write = new ComputerInteractionModel(InteractType.write); art = new ComputerInteractionModel(InteractType.art); compose = new ComputerInteractionModel(InteractType.compose); jobCanvas = FindObjectOfType <FindCareerUi>(); currentChair = FindObjectOfType <ComputerChair>(); this.interactionOptions.PlayerPathfindingTarget = currentChair.interactionOptions.PlayerPathfindingTarget; }
void Progression(ComputerInteractionModel type) { type.progress += type.speed * GameTime.Time.deltaTime; if (type.progress >= 100) { type.progress = 0; type.currentActive = false; ProgressBar.HideUI(progressBarID); //reward funcion; PlayerAnimationHelper.ResetAnimations(); } }
void GeneralProgressAction(ComputerInteractionModel interaction) { InteractionMenu.instance.menuLevel = 0; InteractionMenu.instance.ExitInterMenu(); var result = currentChair.TrySetCurrentAction(interaction.actionName); if (result) { interaction.currentActive = true; currentChair.BeginUsing(); float GetProgress() => interaction.progress; progressBarID = ProgressBar.StartTracking(interaction.description, GetProgress, 100); } else { result.PrintErrorMessage(); } }