-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSequencerCommandAddWarAssets.cs
51 lines (40 loc) · 1.25 KB
/
SequencerCommandAddWarAssets.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
40
41
42
43
44
45
46
47
48
using UnityEngine;
using System.Collections;
using PixelCrushers.DialogueSystem;
namespace PixelCrushers.DialogueSystem.SequencerCommands
{
public class SequencerCommandAddWarAssets : SequencerCommand
{
private GameObject gc = null;
private DisplayAssets assets;
void Start()
{
if (gc == null)
{
gc = GameObject.FindGameObjectWithTag("GameController");
assets = gc.GetComponent<DisplayAssets>();
}
// 0 = Units // 1 = Heroes // 2 = Buildings // 3 = Allies
string path0 = GetParameter(0);
string path1 = GetParameter(1);
string path2 = GetParameter(2);
string path3 = GetParameter(3);
if (path0 != "No")
{
assets.units.Add(path0);
Debug.Log(path0);
}
if (path2 != "No")
{
assets.buildings.Add(path2);
Debug.Log(path2);
}
if (path3 != "No")
{
assets.allies.Add(path3);
Debug.Log(path3);
}
Stop();
}
}
}