Exemplo n.º 1
0
        private static void RestoreRepairedContainer(RepairedContainer repairedContainer)
        {
            GameObject target = FindGameObject(repairedContainer.path, repairedContainer.position);

            if (target == null)
            {
                return;
            }

            RepairableContainer repairableContainer = target.GetComponentInChildren <RepairableContainer>();

            if (repairableContainer != null && !repairableContainer.Applied)
            {
                repairableContainer.ContainerGuid = repairedContainer.guid;
                repairableContainer.Repair();
            }
        }
Exemplo n.º 2
0
        internal static void AddRepairedContainer(string guid, GameObject repairableContainer, string scene)
        {
            RepairedContainer repairedContainer = new RepairedContainer(scene, GetPath(repairableContainer), repairableContainer.transform.position, guid);

            repairedContainers.AddRepairedContainer(repairedContainer);
        }
 public void AddRepairedContainer(RepairedContainer repairedContainer)
 {
     this.containers.RemoveAll(value => Vector3.Distance(value.position, repairedContainer.position) < 0.01f);
     this.containers.Add(repairedContainer);
 }