Exemplo n.º 1
0
    /// <summary>
    /// place a merc caravan in the world using its saved location
    /// </summary>
    /// <param name="targetZone"></param>
    public static MercCaravan3d PlaceSavedMercCaravan(MercCaravan MCdata)
    {
        Zone       targetZone = GameController.GetZoneByID(MCdata.zoneIAmIn);
        GameObject mc3d       = Instantiate(instance.mercCaravan3dPrefab, targetZone.CoordsForWorld, Quaternion.identity);

        mc3d.transform.parent = instance.mercCaravansContainer;
        MercCaravan3d MC3dScript = mc3d.GetComponent <MercCaravan3d>();

        MC3dScript.data = MCdata;
        MC3dScript.RefreshDataDisplay();
        instance.spawnedMCs.Add(MC3dScript);
        return(MC3dScript);
    }
Exemplo n.º 2
0
 public static void RemoveMercCaravan3d(MercCaravan3d target3d)
 {
     instance.spawnedMCs.Remove(target3d);
     Destroy(target3d.gameObject);
 }