Simple "farming"?
Hey everyone! Just looking for a little bit of advice or if someone could point me in the right direction. My skill level in C# is definitely more on the beginner side but I do understand the basics. Basically all I want to do right now is setup a system where you can right click and "till" the ground, then left click on a tilled area and place a little plant thing that grows over time. All I'm really looking for is the foundation of doing something like this, thanks!
I'm assu$$anonymous$$g you want to make a game similar to Harvest $$anonymous$$oon or Rune Factory, where a single spot on the ground is a square that can have various states associated.
If that's the case, here are the steps I would give a newer person on my $$anonymous$$m to get started:
Start out with a single square sprite on the screen (or square mesh if you're using a 3D space)
Add a dirt texture to your space. I find it helps / motivates to have something visual / tangible already relevant on the system you're building.
Get it to print out when it receives mouse events (mouse enter, right click, left click, etc)
See if you can get these mouse events to change its color / texture / sprite
Add a child to that square for whatever plant you want on the space
Read up on Animations and Animator Controllers, specifically how the states are created and linked to certain sprites. These states will be your plant / soil states and match to certain sprites for your plot.
See if you can write some simple code to change between those states. It doesn't have to be perfect.
See if you can attach that code to your mouse events.
If you can do these, then the rest will be your preference on how to build the class objects and whatnot in the most sensible way for your project.
Your answer
Follow this Question
Related Questions
Place GameObject on terrain even if player is looking up 2 Answers
Need help with GameObject placement 2 Answers
Black Scrreen after Splash Screen after deploy on HoloLens 1 Answer
How add(create) a new gameobject on scene on mouse button click. 2 Answers
Linux Ubuntu: Typespace 'UnityEngine' Could Not Be Found 0 Answers