forked from JXPorter/OkitaUnity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebugging.cs
More file actions
50 lines (43 loc) · 955 Bytes
/
Debugging.cs
File metadata and controls
50 lines (43 loc) · 955 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using UnityEngine;
using System.Collections;
public class Debugging : MonoBehaviour
{
// Use this for initialization
void Start()
{
//int a = 0, b = 0;
int a = 0;
int b = 0;
Debug.Log(a + b);
int c = a;
int d = b;
ArrayList list = new ArrayList();
list.Add(1);
list.Add("this");
list.Add(1.0);
list.Add(1.0f);
//lists van have anything in them!
foreach (object i in list)
{
Debug.Log(i);
int j = (int)i;
Debug.Log(j);
string s = i as string;
Debug.Log(s);
}
Monster m = new Monster(7);
Debug.Log(m.MaxHitPoints);
}
// Update is called once per frame
void Update()
{
}
}
public class Monster
{
public readonly int MaxHitPoints = 10;
public Monster(int hp)
{
this.MaxHitPoints = hp;
}
}