Example #1
0
 public void ActionPointJointsUpdated(ProjectRobotJoints joints)
 {
     try {
         ActionPoint actionPoint = GetActionPointWithJoints(joints.Id);
         actionPoint.UpdateJoints(joints);
         OnActionPointUpdated?.Invoke(this, new ActionPointUpdatedEventArgs(actionPoint));
         OnProjectChanged?.Invoke(this, EventArgs.Empty);
     } catch (KeyNotFoundException ex) {
         Debug.LogError(ex);
         Notifications.Instance.ShowNotification("Failed to update action point joints", ex.Message);
         return;
     }
 }
Example #2
0
 public void ActionPointOrientationRemoved(NamedOrientation orientation)
 {
     try {
         ActionPoint actionPoint = GetActionPointWithOrientation(orientation.Id);
         actionPoint.RemoveOrientation(orientation);
         OnActionPointUpdated?.Invoke(this, new ActionPointUpdatedEventArgs(actionPoint));
         OnProjectChanged?.Invoke(this, EventArgs.Empty);
     } catch (KeyNotFoundException ex) {
         Debug.LogError(ex);
         Notifications.Instance.ShowNotification("Failed to remove action point orientation", ex.Message);
         return;
     }
 }
Example #3
0
 public void ActionPointBaseUpdated(ProjectActionPoint projectActionPoint)
 {
     try {
         ActionPoint actionPoint = GetActionPoint(projectActionPoint.Id);
         actionPoint.ActionPointBaseUpdate(projectActionPoint);
         OnActionPointsChanged?.Invoke(this, EventArgs.Empty);
         OnActionPointUpdated?.Invoke(this, new ActionPointUpdatedEventArgs(actionPoint));
         OnProjectChanged?.Invoke(this, EventArgs.Empty);
     } catch (KeyNotFoundException ex) {
         Debug.Log("Action point " + projectActionPoint.Id + " not found!");
         Notifications.Instance.ShowNotification("", "Action point " + projectActionPoint.Id + " not found!");
         return;
     }
 }
Example #4
0
 public async void ProjectBaseUpdated(Project data)
 {
     if (GameManager.Instance.GetGameState() == GameManager.GameStateEnum.ProjectEditor)
     {
         Project.Desc     = data.Desc;
         Project.HasLogic = data.HasLogic;
         Project.Modified = data.Modified;
         Project.Name     = data.Name;
         OnProjectChanged?.Invoke(this, EventArgs.Empty);
     }
     else if (GameManager.Instance.GetGameState() == GameManager.GameStateEnum.MainScreen)
     {
         await GameManager.Instance.LoadProjects();
     }
 }
Example #5
0
 public void ActionPointAdded(ProjectActionPoint projectActionPoint)
 {
     if (projectActionPoint.Parent == null || projectActionPoint.Parent == "")
     {
         SpawnActionPoint(projectActionPoint, null);
     }
     else
     {
         try {
             IActionPointParent actionPointParent = GetActionPointParent(projectActionPoint.Parent);
             SpawnActionPoint(projectActionPoint, actionPointParent);
         } catch (KeyNotFoundException ex) {
             Debug.LogError(ex);
         }
     }
     OnActionPointsChanged?.Invoke(this, EventArgs.Empty);
     OnProjectChanged?.Invoke(this, EventArgs.Empty);
 }
Example #6
0
 public void ActionPointRemoved(ProjectActionPoint projectActionPoint)
 {
     RemoveActionPoint(projectActionPoint.Id);
     OnActionPointsChanged?.Invoke(this, EventArgs.Empty);
     OnProjectChanged?.Invoke(this, EventArgs.Empty);
 }
Example #7
0
 public void ActionRemoved(IO.Swagger.Model.Action action)
 {
     ProjectManager.Instance.RemoveAction(action.Id);
     OnProjectChanged?.Invoke(this, EventArgs.Empty);
 }