Esempio n. 1
0
        void Start()
        {
            try
            {
                //employees = await ServerCaller.GetEmployeesAsync();
                employees = ServerCaller.GetEmployees();
                float x = 0;
                float y = 0;
                float z = 0.3f;
                int   n = 0;
                foreach (var employee in employees)
                {
                    GameObject corteButton = Instantiate(BaseButton, new Vector3(x, y, z), Quaternion.identity) as GameObject;
                    UpdateText(employee, corteButton);
                    x += 0.035f;

                    // Rows of 4 buttons
                    if (++n == 4)
                    {
                        y += 0.035f;
                        x  = 0;
                        n  = 0;
                    }
                }
            }
            catch (Exception e)
            {
                Debug.Log(e.Message);
            }
        }
Esempio n. 2
0
 private void GetTasks(string employeeId)
 {
     // tasks = await ServerCaller.GetEmployeeTasksAsync(employeeId);
     tasks = ServerCaller.GetEmployeeTasks();
 }