1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- [CreateAssetMenu(menuName = "SCConfig/SCDeviceConfig")]
- public class DeviceParam : ScriptableObject {
- public enum DeviceType {
- Action,
- ActionPro,
- Jimo,
- V01
- }
- [Serializable]
- public class Device {
- public DeviceType type;
- public bool HasRGB=true;
- public Vector3 RGBRotationOffset;
- public Vector3 RGBPositionOffset;
- }
- public Device Action = new Device {
- type = DeviceType.Action,
- HasRGB = true,
- RGBRotationOffset = new Vector3(8.0f, 0.0f, 0.0f),
- RGBPositionOffset = new Vector3(0.0f, 0.04f, 0.0f),
- };
- public Device ActionPro = new Device {
- type = DeviceType.ActionPro,
- HasRGB = true,
- RGBRotationOffset = new Vector3(8.0f, 0.0f, 0.0f),
- RGBPositionOffset = new Vector3(0.0f, 0.04f, 0.0f),
- };
- public Device Jimo = new Device {
- type = DeviceType.Jimo,
- HasRGB = true,
- RGBRotationOffset = new Vector3(0.0f, 0.0f, 0.0f),
- RGBPositionOffset = new Vector3(0.0f, 0.04f, 0.0f),
- };
- public Device V01 = new Device {
- type = DeviceType.V01,
- HasRGB = false,
- RGBRotationOffset = Vector3.zero,
- RGBPositionOffset = Vector3.zero,
- };
- public Device Current {
- get {
- if(DeviceInfo.MODEL == "JIMO") {
- return Jimo;
- } else if(DeviceInfo.MODEL == "V01") {
- return V01;
- } else if(DeviceInfo.MODEL == "A01") {
- return Action;
- } else if(DeviceInfo.MODEL == "A01_PRO") {
- return ActionPro;
- } else {
- return ActionPro;
- }
- }
- }
- }
|