8 public override void OnActivate()
10 WidgetUnityChan.Instance =
this;
11 this.goWorld = UnityEngine.Object.Instantiate<GameObject>(this.prefabWorld);
12 this.animator = this.goWorld.GetComponentInChildren<Animator>();
13 this.cam = this.goWorld.GetComponentInChildren<Camera>();
17 public void OnDestroy()
19 UnityEngine.Object.DestroyImmediate(this.goWorld);
23 public void Refresh(
float angle)
25 this.animator.transform.localEulerAngles =
new Vector3(0f, angle + this.angleFix, 0f);
26 this.cam.fieldOfView = (this.up ? 6f : 12f);
30 public override void OnSetContextMenu(UIContextMenu m)
32 m.AddChild(
"setting").AddToggle(
"Up", this.up, delegate(
bool a)
36 base.SetBaseContextMenu(m);
43 public float angleFix;
49 public GameObject goWorld;
52 public GameObject prefabWorld;
55 public Animator animator;
61 public Vector3 scroll;