Beispiel #1
0
 public void UpdateMoveState(CheckPointInformation point)
 {
     if (point == Model.AuxiliaryPos)
     {
         UpdateAmountUp();
     }
 }
 public void DeleteCheckPoint(CheckPointInformation info)
 {
     if (pointParents.TryGetValue(info.ID, out var parent))
     {
         Destroy(parent.gameObject);
     }
     checkPoints.Remove(info);
 }
 public void RemoveCheckPointListener(CheckPointInformation info, Action <CheckPointInformation> moveIntoAction, Action <CheckPointInformation> leaveAction = null)
 {
     if (checkPoints.TryGetValue(info, out var checkPoint))
     {
         if (checkPoint)
         {
             checkPoint.RemoveListener(moveIntoAction, leaveAction);
         }
         else
         {
             checkPoints.Remove(info);
         }
     }
 }
    public CheckPointData CreateCheckPoint(CheckPointInformation info, Action <CheckPointInformation> moveIntoAction, Action <CheckPointInformation> leaveAction = null)
    {
        if (!info || !info.IsValid || info.Scene != ZetanUtility.ActiveScene.name)
        {
            return(null);
        }
        CheckPointData checkPointData = new CheckPointData(info);

        checkPointData.AddListener(moveIntoAction, leaveAction);
        foreach (var position in info.Positions)
        {
            checkPointData.Entities.Add(CreateCheckPointEntity(checkPointData, position));
        }
        return(checkPointData);
    }
 public CheckPointData AddCheckPointListener(CheckPointInformation info, Action <CheckPointInformation> moveIntoAction, Action <CheckPointInformation> leaveAction = null)
 {
     if (checkPoints.TryGetValue(info, out var checkPoint))
     {
         if (checkPoint)
         {
             checkPoint.AddListener(moveIntoAction, leaveAction);
             return(checkPoint);
         }
         else
         {
             checkPoints.Remove(info);
             return(CreateCheckPoint(info, moveIntoAction, leaveAction));
         }
     }
     else
     {
         return(CreateCheckPoint(info, moveIntoAction, leaveAction));
     }
 }
Beispiel #6
0
 public CheckPointData(CheckPointInformation info)
 {
     Info = info;
 }