Пример #1
0
    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);
    }
Пример #2
0
    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;
        }
    }
Пример #3
0
    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);
    }
Пример #4
0
    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);
    }
Пример #5
0
    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);
    }
Пример #6
0
 public void Interact(eINPUT_INTERACT input)
 {
     currentState.Interact(input);
 }
Пример #7
0
 public virtual void Interact(eINPUT_INTERACT input)
 {
 }
Пример #8
0
 public override void Interact(eINPUT_INTERACT input)
 {
     if (input == eINPUT_INTERACT.BT1)
     {
     }
 }
Пример #9
0
 public override void Interact(eINPUT_INTERACT input)
 {
     machine.ChangeState(new State_Work(machine));
 }
Пример #10
0
 public override void Interact(eINPUT_INTERACT input)
 {
     machine.controller.jobInRange.jobObject.Interact(input);
 }