Exemplo n.º 1
0
        private void delete(object sender, RoutedEventArgs e)
        {
            if (isNewResource)
            {
                NavigationService.Navigate(new Page());
                return;
            }

            ResourceView newResource = null;

            foreach (var resource in ResourcePage.ResourceList)
            {
                if (resource.Id == Int32.Parse(idLabel.Content.ToString()))
                {
                    newResource = resource;
                    break;
                }
            }

            MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Da li ste sigurni da zelite da izbrišete ovaj resurs?", "Delete Confirmation", System.Windows.MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                if (_resourceController.Get(newResource.Id) != null)
                {
                    _resourceController.Remove(newResource.Convert().Id);
                }
                ResourcePage.ResourceList.Remove(newResource);
                System.Windows.MessageBox.Show("Promene uspešno sačuvane");
                NavigationService.Navigate(new Page());
                return;
            }
        }
Exemplo n.º 2
0
 public NMWebApp(ResourceView resourceView, ApplicationACLsManager aclsManager, LocalDirsHandlerService
                 dirsHandler)
 {
     this.resourceView = resourceView;
     this.aclsManager  = aclsManager;
     this.dirsHandler  = dirsHandler;
 }
Exemplo n.º 3
0
        protected void ResourceView_DataBound(object sender, EventArgs e)
        {
            Image image  = (System.Web.UI.WebControls.Image)ResourceView.FindControl("imgGenderIcon");
            Label gender = (System.Web.UI.WebControls.Label)ResourceView.FindControl("lblgender");

            //if (image == null) return;
            image.ImageUrl = "employeImages/" + resourceId + ".jpg";

            if (gender.Text == "F")
            {
                image.Attributes.Add("onerror", "this.src='../employeImages/female.jpg';");
            }
            else
            {
                image.Attributes.Add("onerror", "this.src='../employeImages/male.jpg';");
            }

            //Label lblCV_link = (System.Web.UI.WebControls.Label)ResourceView.FindControl("lblCV_link");
            HyperLink HL_Cv_link = (System.Web.UI.WebControls.HyperLink)ResourceView.FindControl("HL_Cv_link");

            if (String.IsNullOrEmpty(HL_Cv_link.NavigateUrl))
            {
                HL_Cv_link.Text = "N/A";
            }

            //Label lblProfile = (System.Web.UI.WebControls.Label)ResourceView.FindControl("lblProfile");
            HyperLink HL_Profile = (System.Web.UI.WebControls.HyperLink)ResourceView.FindControl("HL_Profile");

            if (String.IsNullOrEmpty(HL_Profile.NavigateUrl))
            {
                HL_Profile.Text = "N/A";
            }
        }
Exemplo n.º 4
0
    private void CheckViewObject()
    {
        int prefabResource = (maxResouse / 3);

        //Make sure we have the correct object on the tile
        if (resourceLeft > (prefabResource * 2))
        {
            if (view != ResourceView.Full)
            {
                view = ResourceView.Full;
                CreateObject();
            }
        }
        else if (resourceLeft > prefabResource)
        {
            if (view != ResourceView.Moderate)
            {
                view = ResourceView.Moderate;
                CreateObject();
            }
        }
        else
        {
            if (view != ResourceView.Limited)
            {
                view = ResourceView.Limited;
                CreateObject();
            }
        }
    }
Exemplo n.º 5
0
            public void Create(SharpDX.Direct3D11.Device device, int Width, int Height)
            {
                Dispose();

                textureDescription.Width  = Width;
                textureDescription.Height = Height;
                //textureDescription.Format = Format.R32_Typeless;
                textureDescription.SampleDescription = new SampleDescription(SamplesCount, 0);
                Map           = new Texture2D(device, textureDescription);
                Map.DebugName = Name + "Map";

                ResourceView?.Dispose();
                //shaderResourceDescription.Format = Format.R32_Float;
                shaderResourceDescription.Dimension = SamplesCount > 1 ?
                                                      ShaderResourceViewDimension.Texture2DMultisampled :
                                                      ShaderResourceViewDimension.Texture2D;
                ResourceView           = new ShaderResourceView(device, Map, shaderResourceDescription);
                ResourceView.DebugName = Name + "SRV";

                View?.Dispose();
                //DSViewDescription.Format = Format.D32_Float;
                DSViewDescription.Dimension = SamplesCount > 1 ?
                                              DepthStencilViewDimension.Texture2DMultisampled :
                                              DepthStencilViewDimension.Texture2D;
                View           = new DepthStencilView(device, Map, DSViewDescription);
                View.DebugName = Name + "RTV";
            }
Exemplo n.º 6
0
        public ActionResult GetPowerList(Dictionary <string, string> queryvalues)
        {
            string seachtype = queryvalues.ContainsKey("seachtype") ? queryvalues["seachtype"] : "";
            string Value     = queryvalues.ContainsKey("Value") ? queryvalues["Value"] : "";

            ViewData["seachtype"] = seachtype;
            ViewData["Value"]     = Value;
            ResourceView           model   = new ResourceView();
            IEnumerable <Resource> resList = new List <Resource>();

            if (seachtype == "1")
            {//角色查询
                resList = SUBLL.GetResourceListByRoleName(Value.Trim());
            }
            else if (seachtype == "2")
            {//用户查询
                if (Value.Trim() == "admin")
                {
                    resList = SUBLL.GetAdminResourceList();
                }
                else
                {
                    resList = SUBLL.GetUserRoleResourceListByUserId(Value.Trim());
                }
            }
            else
            {
            }
            model.DataList = resList;
            model.UserID   = Value;
            return(View(model));
        }
Exemplo n.º 7
0
 public WebServer(Context nmContext, ResourceView resourceView, ApplicationACLsManager
                  aclsManager, LocalDirsHandlerService dirsHandler)
     : base(typeof(Org.Apache.Hadoop.Yarn.Server.Nodemanager.Webapp.WebServer).FullName
            )
 {
     this.nmContext = nmContext;
     this.nmWebApp  = new WebServer.NMWebApp(resourceView, aclsManager, dirsHandler);
 }
Exemplo n.º 8
0
        /// <summary>
        /// 修改页面资源
        /// </summary>
        /// <param name="resouceId">页面资源id</param>
        /// <param name="resourceView">页面资源信息</param>
        /// <param name="operatorAccount">操作员账号</param>
        public static void UpdateResource(Guid resouceId, ResourceView resourceView, string operatorAccount)
        {
            var resource   = Resource.GetResource(resouceId, resourceView);
            var repository = Factory.CreateSystemResourceRepository();

            repository.Update(resource);
            LogHelper.SaveUpdateResourceLog(resource, operatorAccount);
        }
Exemplo n.º 9
0
        /// <summary cref="DisposeBase.Dispose(bool)"/>
        protected override void Dispose(bool disposing)
        {
            ResourceView?.Dispose();
            ResourceView = null;

            UnorderedAccessView?.Dispose();
            UnorderedAccessView = null;
        }
Exemplo n.º 10
0
        /// <summary>
        /// 添加页面资源
        /// </summary>
        /// <param name="subMenu">子菜单id</param>
        /// <param name="resourceView">页面资源信息</param>
        /// <param name="operatorAccount">操作员账号</param>
        public static Resource RegisterResource(Guid subMenu, ResourceView resourceView, string operatorAccount)
        {
            var resource   = Resource.GetResource(resourceView);
            var repository = Factory.CreateSystemResourceRepository();

            repository.Register(subMenu, resource);
            LogHelper.SaveRegisterResourceLog(subMenu, resource, operatorAccount);
            return(resource);
        }
Exemplo n.º 11
0
        private void addResource_Click(object sender, RoutedEventArgs e)
        {
            ResourceView resource = new ResourceView();
            //ResourceList.Add(resource);

            var openPage = new ResourceProfilePage(resource, true);

            frame.Navigate(openPage);
        }
Exemplo n.º 12
0
 public void Dispose()
 {
     Map?.Dispose();
     Map = null;
     ResourceView?.Dispose();
     ResourceView = null;
     View?.Dispose();
     View = null;
 }
Exemplo n.º 13
0
        public ActionResult SetUserResource(string id)
        {
            ResourceView model = new ResourceView();

            IEnumerable <Resource> resList = SUBLL.GetResourceListByUserId(id);

            model.DataList = resList;
            model.UserID   = id;
            return(View(model));
        }
Exemplo n.º 14
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            MetisBLL bll = new MetisBLL();
            // calling the getResourceById procedure using ResourceId.
            DataTable dt = new DataTable();

            dt = bll.getResourceDetailById(ResourceId);
            ResourceView.DataSource = dt;
            ResourceView.DataBind();
        }
Exemplo n.º 15
0
        public UCAppDomainEntry(ResourceView view)
        {
            this.view    = view;
            DialogResult = System.Windows.Forms.DialogResult.None;
            InitializeComponent();
            var loginTypes = view.GetLoginTypes();

            cmbLoginType.DataSource    = loginTypes;
            cmbLoginType.DisplayMember = AssemblyReflector.GetMemberName((LoginTypeDto m) => m.Title);
            cmbLoginType.ValueMember   = AssemblyReflector.GetMemberName((LoginTypeDto m) => m.LoginTypeId);
        }
Exemplo n.º 16
0
        private void button_Copy_Click(object sender, RoutedEventArgs e)
        {
            ResourceView newResource = new ResourceView();
            Resource     resource    = new Resource();

            if (!isNewResource)
            {
                foreach (var _resource in ResourcePage.ResourceList)
                {
                    if (_resource.Id == Int32.Parse(idLabel.Content.ToString()))
                    {
                        newResource = _resource;
                        break;
                    }
                }
            }
            else
            {
                newResource.Id = resource.Id;
            }

            if (nameTextBox.Text.Length == 0)
            {
                System.Windows.MessageBox.Show("Unesite pravilno ime materijala.");
                return;
            }
            var s = roomsComboBox.SelectedItem as RoomView;

            if (!isNewResource)
            {
                ResourcePage.ResourceList.Remove(newResource);
            }

            newResource.RoomId = (int)s.Id;
            newResource.Type   = nameTextBox.Text;

            resource = newResource.Convert();

            if (!isNewResource)
            {
                _resourceController.Update(resource);
            }
            else
            {
                _resourceController.Add(resource);
            }
            ResourcePage.ResourceList.Add(newResource);

            System.Windows.MessageBox.Show("Uspešno ste sačuvali informacije.");
            NavigationService.Navigate(new Page());
        }
        /// <summary>
        /// The GetResourceView.
        /// </summary>
        /// <param name="resourceViews">The resourceViews<see cref="List{ResourceView}"/>.</param>
        /// <param name="i">The i<see cref="int"/>.</param>
        /// <param name="parent">The parent<see cref="Transform"/>.</param>
        /// <returns>The <see cref="ResourceView"/>.</returns>
        private ResourceView GetResourceView(List <ResourceView> resourceViews, int i, Transform parent)
        {
            if (i < resourceViews.Count)
            {
                return(resourceViews[i]);
            }
            if (_resourceViewTemplate == null)
            {
                CreateResourceViewTemplate();
            }
            ResourceView result = UnityEngine.Object.Instantiate <ResourceView>(_resourceViewTemplate, parent);

            return(result);
        }
 private static void ResourceView_ShowItem_pof(ResourceView __instance, Item item)
 {
     if (__instance.transform.parent == _actualTargetItemsContainer)
     {
         StationWindowOverviewTabExtender tabExt = __instance.transform.GetComponentInParent <StationWindowOverviewTabExtender>();
         if (tabExt)
         {
             Dictionary <Item, int> demandedItems = tabExt.DemandedItems;
             if (demandedItems != null && demandedItems.TryGetValue(item, out int count))
             {
                 __instance.ShowItem(item, count);
             }
         }
     }
 }
Exemplo n.º 19
0
 protected override void Dispose(bool isDisposing)
 {
     if (ResourceView != null && !ResourceView.IsDisposed)
     {
         ResourceView.Dispose();
     }
     if (RenderView != null && !RenderView.IsDisposed)
     {
         RenderView.Dispose();
     }
     if (Texture != null && !Texture.IsDisposed)
     {
         Texture.Dispose();
     }
 }
Exemplo n.º 20
0
 // Viewに関連付けられているResourceもDispose
 public static void Dispose(ResourceView obj)
 {
     if (obj == null)
     {
         return;
     }
     if (!obj.Disposed)
     {
         Resource resource = obj.Resource;
         if (!resource.Disposed)
         {
             resource.Dispose();
         }
         obj.Dispose();
     }
 }
Exemplo n.º 21
0
        public ResourceProfilePage(ResourceView resource, bool isPrivate = false)
        {
            isNewResource       = isPrivate;
            _resourceController = (Application.Current as App).ResourceController;
            InitializeComponent();

            nameTextBox.Text = resource.Type;
            if (!isNewResource)
            {
                idLabel.Content = resource.Id;
            }

            roomsComboBox.ItemsSource = RoomPage.RoomList;

            foreach (var room in RoomPage.RoomList)
            {
                if (room.Id == resource.RoomId)
                {
                    roomsComboBox.SelectedItem = room;
                }
            }
        }
        internal void AddOneItemToContainer(List <ResourceView> resourceViews, int viewIndex, Transform itemContainer, Item item, int itemAmount, float?neededCount, Func <Item, int, string> itemTooltipTextFunc)
        {
            ResourceView view       = this.GetResourceView(resourceViews, viewIndex, itemContainer);
            Panel        valueCont  = view.gameObject.transform.Find("ValueContainer").GetComponent <Panel>();
            Transform    demandCont = view.transform.Find("DemandContainer");

            if (neededCount != null)
            {
                view.Show(null, null, LazyManager <IconRenderer> .Current.GetItemIcon(item.AssetId), StringHelper.Simplify((double)itemAmount), StringHelper.FormatCountString(item.DisplayName, itemAmount.ToString("N0") + "/" + neededCount.Value.ToString("N0")));

                demandCont.Find <Text>("Value").text = StringHelper.Simplify(neededCount.Value);
                demandCont.gameObject.SetActive(true);
                float ratio = itemAmount / neededCount.Value;
                if (ratio > 1.05f)
                {
                    valueCont.color = Color.blue;
                }
                else
                if (ratio < 0.9f)
                {
                    valueCont.color = Color.red;
                }
                else
                {
                    valueCont.color = new Color(0, 0.88f, 0);
                }
            }
            else
            {
                view.ShowItem(item, null, itemAmount);
                valueCont.color = _resourceViewOrigColor;
                demandCont.gameObject.SetActive(false);
            }
            if (itemTooltipTextFunc != null)
            {
                view.GetComponent <TooltipTarget>().DynamicText = delegate { return(itemTooltipTextFunc.Invoke(item, itemAmount)); };
            }
        }
Exemplo n.º 23
0
 public NodeInfo(Context context, ResourceView resourceView)
 {
     // JAXB needs this
     this.id           = context.GetNodeId().ToString();
     this.nodeHostName = context.GetNodeId().GetHost();
     this.totalVmemAllocatedContainersMB = resourceView.GetVmemAllocatedForContainers(
         ) / BytesInMb;
     this.vmemCheckEnabled = resourceView.IsVmemCheckEnabled();
     this.totalPmemAllocatedContainersMB = resourceView.GetPmemAllocatedForContainers(
         ) / BytesInMb;
     this.pmemCheckEnabled = resourceView.IsPmemCheckEnabled();
     this.totalVCoresAllocatedContainers = resourceView.GetVCoresAllocatedForContainers
                                               ();
     this.nodeHealthy               = context.GetNodeHealthStatus().GetIsNodeHealthy();
     this.lastNodeUpdateTime        = context.GetNodeHealthStatus().GetLastHealthReportTime();
     this.healthReport              = context.GetNodeHealthStatus().GetHealthReport();
     this.nodeManagerVersion        = YarnVersionInfo.GetVersion();
     this.nodeManagerBuildVersion   = YarnVersionInfo.GetBuildVersion();
     this.nodeManagerVersionBuiltOn = YarnVersionInfo.GetDate();
     this.hadoopVersion             = VersionInfo.GetVersion();
     this.hadoopBuildVersion        = VersionInfo.GetBuildVersion();
     this.hadoopVersionBuiltOn      = VersionInfo.GetDate();
 }
Exemplo n.º 24
0
        public UCAppDomainEntry(TransMode mode, ApplicationDomainDto appDomain, ResourceView view)
        {
            DialogResult = System.Windows.Forms.DialogResult.None;
            this.view    = view;
            InitializeComponent();
            this.mode = mode;
            this.ApplicationDomain = appDomain;
            var loginTypes = view.GetLoginTypes();

            cmbLoginType.DataSource    = loginTypes;
            cmbLoginType.DisplayMember = AssemblyReflector.GetMemberName((LoginTypeDto m) => m.Title);
            cmbLoginType.ValueMember   = AssemblyReflector.GetMemberName((LoginTypeDto m) => m.LoginTypeId);
            if (mode == TransMode.EditRecord || mode == TransMode.ViewRecord)
            {
                txtTitle.Text     = appDomain.Title;
                chkEnable.Checked = appDomain.IsEnabled;
                chkLock.Checked   = appDomain.IsLocked;
                if (appDomain.LoginTypeId != null)
                {
                    cmbLoginType.SelectedValue = appDomain.LoginTypeId;
                }
            }
        }
Exemplo n.º 25
0
        static void Main(string[] args)
        {
            Director director = Director.GetInstance();

            View cityView = new CityView();

            cityView.Init();

            Console.WriteLine("------------------------------------------------------------");
            DispatchCustomEvent("Login", "XXX登陆了");
            DispatchCustomEvent("Update", "XXX升级了");

            View userDataView = new UserDataView();

            userDataView.Init();

            Console.WriteLine("------------------------------------------------------------");
            DispatchCustomEvent("Update", "XXX升级了");
            DispatchCustomEvent("Build", "XXX建筑开始建造了");

            View resourceView = new ResourceView();

            resourceView.Init();

            Console.WriteLine("------------------------------------------------------------");
            DispatchCustomEvent("Update", "XXX升级了");
            DispatchCustomEvent("Build", "XXX建筑开始建造了");

            Console.WriteLine("------------------------------------------------------------");
            resourceView.Close();
            DispatchCustomEvent("Update", "XXX升级了");

            Console.WriteLine("------------------------------------------------------------");
            RemoveCustomEvent("Update");
            DispatchCustomEvent("Update", "XXX升级了");
        }
Exemplo n.º 26
0
        public IEnumerable <KeyValuePair <Guid, ResourceView> > QueryResources(Guid submenu)
        {
            var result = new List <KeyValuePair <Guid, ResourceView> >();
            var sql    = "SELECT Id,Name,[Address],Remark,Valid FROM dbo.T_Resource WHERE Menu=@MENU";

            using (var dbOperator = new DbOperator(Provider, ConnectionString)) {
                dbOperator.AddParameter("MENU", submenu);
                using (var reader = dbOperator.ExecuteReader(sql)) {
                    while (reader.Read())
                    {
                        var resourceId   = reader.GetGuid(0);
                        var resourceView = new ResourceView()
                        {
                            Name    = reader.IsDBNull(1) ? string.Empty : reader.GetString(1),
                            Address = reader.IsDBNull(2) ? string.Empty : reader.GetString(2),
                            Remark  = reader.IsDBNull(3) ? string.Empty : reader.GetString(3),
                            Valid   = reader.GetBoolean(4)
                        };
                        result.Add(new KeyValuePair <Guid, ResourceView>(resourceId, resourceView));
                    }
                }
            }
            return(result);
        }
Exemplo n.º 27
0
	public void GoToBake ()
	{
		//interrupt previous actions
		if (gotoResourcePoint) 
		{
			bakeNextCommand = true;
			return;
		}

		gatheringResource= false;
		if (currentResource != null) currentResource = null;

		goToBake = true;
		movement = true;
		MovementTargetPosition = Helpers.RandomPlanePosition(Cake.position, 5f, 5f);
	}
Exemplo n.º 28
0
 protected internal virtual WebServer CreateWebServer(Context nmContext, ResourceView
                                                      resourceView, ApplicationACLsManager aclsManager, LocalDirsHandlerService dirsHandler
                                                      )
 {
     return(new WebServer(nmContext, resourceView, aclsManager, dirsHandler));
 }
Exemplo n.º 29
0
    void Update()
    {
		if (dead) return;

		Animator.SetBool("Carrying", gotoResourcePoint);
		Animator.SetBool("Walking", movement);



		if (gatheringResource)
		{
			if (gatheringTimer < Time.time)
			{
				//gathering done
				gatheringResource = false;
				gotoResourcePoint = true;
				MovementTargetPosition = Helpers.RandomPlanePosition(ResourceDropPoint.transform.position, 3f, 3f);
				movement = true;

				CarryResource.gameObject.SetActive(true);
				CarryResource.sprite = CarrySprites[(int)currentResource.Resource];
			}
			return;
		}
		else if (baking)
		{
			if (bakingTimer < Time.time)
			{
				baking = false;
				GoToBake();
				if (OnBakeCompleteEvent != null)
				{
					bool successfulBake = OnBakeCompleteEvent();

					if (!successfulBake) 
					{
						//look puzzled?
					}
				}
			}
			return;
		}
		
        if (movement == true)
        {
			var movementDirection = (MovementTargetPosition - transform.position).normalized;
            this.transform.position += movementDirection * Time.deltaTime * speed;
            
			int direction = (int)Mathf.Sign(Vector3.Dot(Camera.main.transform.right, movementDirection));
			Animator.transform.localScale = new Vector3(direction, 1, 1);


            if (Vector3.Distance(this.transform.position, MovementTargetPosition) < Time.deltaTime * speed)
            {
				//reached target
                movement = false;

				if (goToBake)
				{
					BakingHat.SetActive(true);
					baking = true;
					bakingTimer = Time.time + BakingDelay;
				}
				else if (gotoResourcePoint == true)
				{
					//drop resource
					gotoResourcePoint = false;
					CarryResource.gameObject.SetActive(false);
					if (OnResourceDroppedEvent != null) OnResourceDroppedEvent(currentResource.Resource);
				
					if (AutomaticalGather)
					{
						//change command
						if (nextResourceCommand != null)
						{
							bakeNextCommand = false;
							currentResource = nextResourceCommand;
							nextResourceCommand = null;
						}
						else if (bakeNextCommand)
						{
							bakeNextCommand = false;
							nextResourceCommand = null;
							GoToBake();
							return;
						}
						getResource(currentResource);
					}
					else
					{
						currentResource = null;
					}
				}
				else if (currentResource)
				{
					//start gathering
					gatheringResource = true;
					gatheringTimer = Time.time + currentResource.ResourceGatheringDelay;
				}
            }
        }
    }
Exemplo n.º 30
0
 public NodeBlock(Context context, ResourceView resourceView)
 {
     this.context      = context;
     this.resourceView = resourceView;
 }
Exemplo n.º 31
0
        /// <summary>
        /// Create a resource view.
        /// Documentation https://developers.google.com/resourceviews/v1beta2/reference/zoneViews/insert
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated resourceviews service.</param>
        /// <param name="project">The project name of the resource view.</param>
        /// <param name="zone">The zone name of the resource view.</param>
        /// <param name="body">A valid resourceviews v1beta2 body.</param>
        /// <returns>OperationResponse</returns>
        public static Operation Insert(resourceviewsService service, string project, string zone, ResourceView body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }
                if (project == null)
                {
                    throw new ArgumentNullException(project);
                }
                if (zone == null)
                {
                    throw new ArgumentNullException(zone);
                }

                // Make the request.
                return(service.ZoneViews.Insert(body, project, zone).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request ZoneViews.Insert failed.", ex);
            }
        }
Exemplo n.º 32
0
 public void Dispose()
 {
     ResourceView.Dispose();
 }
Exemplo n.º 33
0
 public void Bind(int slot, ResourceView resource)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 34
0
 public void Unbind(ResourceView resource)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 35
0
	public void getResource(ResourceView resource)
    {
		if (gotoResourcePoint)
		{
			//just change the next resource
			nextResourceCommand = resource;
			return;
		}

		//interrupt previous actions

			baking = false;
			BakingHat.SetActive(false);

		gatheringResource= false;
		goToBake = false;

		currentResource = resource;
		var newPosition = Helpers.RandomPlanePosition(resource.transform.position, 3f, 3f);
		newPosition.y = transform.position.y;
        MovementTargetPosition = newPosition;
        movement = true;
    }