public override eJOB_STATUT Interact(eINPUT_INTERACT inputTriggered) { eJOB_STATUT statut = base.Interact(inputTriggered); switch (statut) { case eJOB_STATUT.SUCCEEDED: if (spawnIfSucceed) { if (items.Count < maxItems) { SpawnItem(); } } else { if (items.Count > 0) { DestroyItem(); } } break; } return(statut); }
private void ShowInput(eINPUT_INTERACT input) { switch (jobReference.controller.controllerType) { case eCONTROLLER.CONTROLLER: imgButton.sprite = inputs[(int)input]; break; case eCONTROLLER.KEYBOARD: imgButton.sprite = inputs[(int)input + 4]; break; } }
public override eJOB_STATUT Interact(eINPUT_INTERACT inputTriggered) { eJOB_STATUT statut = base.Interact(inputTriggered); switch (statut) { case eJOB_STATUT.SUCCEEDED: if (efficiency < 1) { efficiency += (valuePerSuccess > 1 - efficiency) ? 1 - efficiency : valuePerSuccess; } break; } return(statut); }
public override eJOB_STATUT Interact(eINPUT_INTERACT inputTriggered) { eJOB_STATUT statut = base.Interact(inputTriggered); switch (statut) { case eJOB_STATUT.SUCCEEDED: if (nbSpawnPermitted > 0) { AiManager.instance.SpawnAI(); --nbSpawnPermitted; } break; } return(statut); }
public virtual eJOB_STATUT Interact(eINPUT_INTERACT inputTriggered) { eJOB_STATUT statut; if (canPerform) { onInteract?.Invoke(inputTriggered); if (inputTriggered == requiredInputs[currentInput]) { if (currentInput < requiredInputs.Length - 1) { ++currentInput; newInput?.Invoke(requiredInputs[currentInput]); statut = eJOB_STATUT.NEXT; actionNextSound.Post(gameObject); } else { currentInput = 0; newInput?.Invoke(requiredInputs[currentInput]); statut = eJOB_STATUT.SUCCEEDED; actionSuccessSound.Post(gameObject); } } else { statut = eJOB_STATUT.FAILED; actionFailSound.Post(gameObject); } } else { statut = eJOB_STATUT.FAILED; actionFailSound.Post(gameObject); } Debug.Log(statut); return(statut); }
public void Interact(eINPUT_INTERACT input) { currentState.Interact(input); }
public virtual void Interact(eINPUT_INTERACT input) { }
public override void Interact(eINPUT_INTERACT input) { if (input == eINPUT_INTERACT.BT1) { } }
public override void Interact(eINPUT_INTERACT input) { machine.ChangeState(new State_Work(machine)); }
public override void Interact(eINPUT_INTERACT input) { machine.controller.jobInRange.jobObject.Interact(input); }