Exemple #1
0
    private void UpdateBuilder()
    {
        if (actionLockController.IsLocked())
        {
            return;
        }
        if (builder == null)
        {
            return;
        }

        nearestToBuilder = GetNearest(buildDistance, builder.root.position);
        if (nearestToBuilder == null)
        {
            Unindicate();
            return;
        }
        if (nearestToBuilder.GetBlockCount() >= nearestToBuilder.GetMaxBlock())
        {
            Unindicate();
            return;
        }

        Indicate(nearestToBuilder);
    }
Exemple #2
0
 private void HandleBuildRequest()
 {
     if (nearestToBuilder == null)
     {
         return;
     }
     for (int i = 0; i < buildCount; i++)
     {
         if (nearestToBuilder.GetBlockCount() == nearestToBuilder.GetMaxBlock())
         {
             break;
         }
         nearestToBuilder.AddBlock();
     }
 }