Introduction

00:00:00:09 - 00:00:09:19

Peter

In this section, we are going to add rain effects to our game and ensure that when it is raining our crops gets watered.


00:00:11:27 - 00:00:33:06

Peter

In terms of the code, we are going to add a couple of new classes. We are trying to add classes rather than modify them. The ones that are currently in our project. But it sometimes is unavoidable. So we are going to have a weather system that will control in which they said we should have a rain in our game.


00:00:33:19 - 00:00:58:14

Peter

This is will be based on the weather data as scripted objects that contains rainy days. Those will be lists of days. So basically the date when it should rain in a single month and the weather data so will contain a list of those lists. So per each month we can decide when it will rain this month and this will be referenced by our weather system.


00:00:59:03 - 00:01:18:05

Peter

Next, we are going to have the rain controller. This will be controlling the particle system. So we are going to trigger on an all of the rain particles. Now, on the other hand, we are going to also have the connection to our timer manager. And based on this, we are going to know if we should turn all of the rain or no.


00:01:18:17 - 00:01:47:04

Peter

And of course, we can later on add snow or any other effect that you want. But we are going to have only rain in our implementation. Now, the other part of this, because this is basically a separate thing, a visual representation of our rain particles, but our rain should obviously water our crops and that's what water all crops when raining clouds will handle based on our events from our weather weather system, we are going to trigger this functionality.


00:01:47:16 - 00:02:10:05

Peter

The problem is that our field controller doesn't implement anything like water all crops. So that's what we are going to add to our implementation. We are going to add this functional view where we can water all the crops at once, and that's what why we need to modify our field controller. And that's basically how we're going to implement our weather system into our game.


00:02:10:17 - 00:02:12:15

Peter

Okay, let's go to our project.


Complete and Continue