RaionMobileAnalogInputLibrary
1.0.0
ห้องสมุดอะนาล็อกเกมเสมือนจริงเพื่อความสามัคคี
.UnityPackage
.apk
Assets
├───raion
│ └───MobileAnalogInput
│ └───Scripts
│ │ Library.cs
│ │
│ └───Internal
│ Canvas.cs
│ Helper.cs
│ UI.cs
│ UIBackground.cs
│ UIForeground.cs
│
└───Resources
└───raion
└───MobileAnalogInput
└───Sprites
Raion.MobileAnalogInput.Sprite.Circle.png
เพื่อเริ่มต้นไลบรารี:
raion . MobileAnalogInput . Library . GetInstance ( ) ;เพื่อใช้ห้องสมุด:
using UnityEngine ;
public class LibraryTest : MonoBehaviour {
private void Update ( ) {
float speed = 10.0f ;
Vector2 direction =
raion . MobileAnalogInput . Library . GetInstance ( ) . GetDirection ( ) ;
Vector3 velocity = Vector3 . zero ;
velocity . x = direction . x ;
velocity . z = direction . y ;
// Moving the GameObject
transform . position += velocity * speed * Time . deltaTime ;
}
}