12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using UnityEngine;
- namespace WS
- {
-
- public abstract class View : WSComponent
- {
-
- public GameObject UIGameObject;
-
- public ViewGroup Group = ViewGroup.From;
-
- public ViewShowModeType ShowModeType = ViewShowModeType.Screen;
-
- public ViewShowType ShowType = ViewShowType.Close;
-
- public AnimationComponent AnimComponent;
-
- public abstract void LoadInit();
-
- public virtual void SetPosition() { }
-
- public virtual void SetPosition(Vector3 pos, Quaternion rot)
- {
- #if PLATFORM_PICO
- if (ShowModeType != ViewShowModeType.Screen)
- {
- UIGameObject.transform.parent.position = pos;
- UIGameObject.transform.parent.rotation = rot;
- return;
- }
- #endif
- UIGameObject.transform.localPosition = pos;
- UIGameObject.transform.localRotation = rot;
- }
-
- public virtual void OnOpen() { }
- public override void Dispose()
- {
- base.Dispose();
- UIGameObject = null;
- Group = ViewGroup.From;
- ShowType = ViewShowType.Close;
- ShowModeType = ViewShowModeType.Screen;
- }
- }
- }
|