PlayerManager.cs
1.15 KB
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
51
52
53
//Log Dir http://docs.unity3d.com/Manual/LogFiles.html
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;
using UnityEngine.UI;
public class PlayerManager : GenericPlayerManager {
private const string BASE_URL = "http://150.165.205.9/anims/WEBGL/";
//private const string BASE_URL = "http://150.165.205.9/anims/AssetBundles/0_DefaultBundles/";
public InputField INFIELD;
private int version = 1;
public void catchGlosa(String glosa)
{
//Debug.Log ("glosa antes do catch: "+glosa);
base.glosa = glosa;
//Debug.Log("glosa depois do catch: "+glosa);
start_web_play();
}
public void start_web_play()
{
try {
base.play();
} catch(Exception e) {
e.ToString();//Debug.Log(e+" :: Ops!");
}
}
protected override WWW loadAssetBundle(string aniName)
{
return WWW.LoadFromCacheOrDownload(BASE_URL + aniName, version);
}
public void start_inputfield_web_play()
{
try {
base.glosa = INFIELD.text;
base.play();
}
catch (Exception e) {
Debug.Log (e+" :: Exception StartCourr");
}
}
}