Beispiel #1
0
    public void GetRidOfItem(int i)
    {
        //NumberOfItemsInSupply--;
        //if (NumberOfItemsInSupply == 0)
        //{
        //    HideCoaster(characterCoaster);
        //    TilePawnIsOn.EntityTypeOnTile = EnumHolder.EntityType.Clear;
        //    TilePawnIsOn.DeactivateTile();

        //}
        if (cariedObjects.Count == 0)
        {
            HideCoaster(characterCoaster);
            TilePawnIsOn.EntityTypeOnTile = EnumHolder.EntityType.Clear;
            TilePawnIsOn.DeactivateTile();
        }
    }
 void walkBack(int targetIndex)
 {
     if (path[targetIndex].EntityTypeOnTile == EnumHolder.EntityType.Clear || path[targetIndex] == TilePawnIsOn)
     {
         TilePawnIsOn.EntityTypeOnTile = EnumHolder.EntityType.Clear;
         TilePawnIsOn.DeactivateTile();
         characterCoaster.OnStopMoving = AILookForAction;
         TilePawnIsOn = path[targetIndex];
         TilePawnIsOn.EntityTypeOnTile = EnumHolder.EntityType.Character;
         PathRequestManager.RequestPath(PreviousTile, TilePawnIsOn, characterCoaster.MoveAlongPath);
         targetIndex = 0;
     }
     else
     {
         walkBack(targetIndex - 1);
     }
 }