-
Notifications
You must be signed in to change notification settings - Fork 0
/
LocationWeather.cs
39 lines (29 loc) · 998 Bytes
/
LocationWeather.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using Netcode;
public class LocationWeather : INetObject<NetFields>
{
public readonly NetInt weatherForTomorrow = new NetInt();
public readonly NetBool isRaining = new NetBool();
public readonly NetBool isSnowing = new NetBool();
public readonly NetBool isLightning = new NetBool();
public readonly NetBool isDebrisWeather = new NetBool();
public NetFields NetFields { get; } = new NetFields();
public LocationWeather()
{
NetFields.AddFields(isRaining, isSnowing, isLightning, isDebrisWeather, weatherForTomorrow);
}
public void InitializeDayWeather()
{
isRaining.Value = false;
isSnowing.Value = false;
isLightning.Value = false;
isDebrisWeather.Value = false;
}
public void CopyFrom(LocationWeather other)
{
isRaining.Value = other.isRaining.Value;
isSnowing.Value = other.isSnowing.Value;
isLightning.Value = other.isLightning.Value;
isDebrisWeather.Value = other.isDebrisWeather.Value;
weatherForTomorrow.Value = other.weatherForTomorrow.Value;
}
}