-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathRadio.cs
More file actions
34 lines (28 loc) · 712 Bytes
/
Copy pathRadio.cs
File metadata and controls
34 lines (28 loc) · 712 Bytes
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
//-------------------------------------------------------------------------------------
// Radio.cs
//-------------------------------------------------------------------------------------
using UnityEngine;
using System.Collections;
public class Radio : IElectronicDevice
{
protected int volume = 0;
public void On()
{
Debug.Log("Radio is On");
}
public void Off()
{
Debug.Log("Radio is Off");
}
public void VolumeUp()
{
++volume;
Debug.Log("Radio Turned Volume Up to " + volume);
}
public void VolumeDown()
{
if (volume > 0)
--volume;
Debug.Log("Radio Turned Volume Down to " + volume);
}
}