Esempio n. 1
0
    /// <summary>
    /// When the employee collides with a machine counter
    /// </summary>
    /// <param name="cell">Cell position of the collision</param>
    /// <param name="machine"></param>
    protected override void ActOnMachineCollision(Vector3Int cell, MachineManager machine)
    {
        // check for machine availability
        if (!machine.IsAvailableForEmployee(cell))
        {
            return;
        }

        // triggers behavior states
        AkSoundEngine.PostEvent("DialogueRegister", gameObject);
        behavior.SetTrigger("Operate cash register");

        // interact with the machine
        machine.EmployeeCollision(cell, this);
    }