Beispiel #1
0
 public override void MergeInside(SlimeType type)
 {
     if (type.IsKing())
     {
         throw new Exception("Cannot Merge King inside");
     }
     mergedSlimes.Set(type, true);
     RecalculateState();
 }
Beispiel #2
0
    public bool SetCheckpoint(SlimeType type, IPlayerRespawner checkpoint)
    {
        IPlayerRespawner previousCheckpoint = checkpointsMap.Get(type);

        if (previousCheckpoint == checkpoint)
        {
            return(false);
        }
        if (previousCheckpoint != null)
        {
            previousCheckpoint.OnDeactivate(type);
        }
        checkpointsMap.Set(type, checkpoint);
        checkpoint.OnActivate(type);
        return(true);
    }