This commit is contained in:
CortexCore
2023-10-02 23:24:56 +08:00
parent 8ef5c7ec0a
commit 947e52e748
183 changed files with 107857 additions and 9378 deletions

View File

@@ -29,7 +29,7 @@ namespace BITKit
if (currentActive is not null && playerConfig is not null)
{
var currentFov = currentActive.m_Lens.FieldOfView;
Ads = currentFov / playerConfig.fov;
Ads = currentFov / playerConfig.Fov;
}
}
}

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Experimental.Audio;
using UnityEngine.UIElements;
namespace BITKit
@@ -12,6 +13,7 @@ namespace BITKit
{
private Slider _timeScaleSlider;
private Button _resetTimeScaleButton;
private TextField _commandTextField;
[MenuItem("Tools/Common Editor")]
private static void OpenEditor()
@@ -42,9 +44,20 @@ namespace BITKit
Time.timeScale = 1;
_timeScaleSlider.value = 1;
};
rootVisualElement.Add(_timeScaleSlider);
rootVisualElement.Add(_resetTimeScaleButton);
_commandTextField = rootVisualElement.Create<TextField>();
_commandTextField.isDelayed = true;
_commandTextField.RegisterCallback<ChangeEvent<string>>(ExecuteCommand);
}
private void ExecuteCommand(ChangeEvent<string> evt)
{
Debug.Log($"Execute command: {evt.newValue}");
_commandTextField.SetValueWithoutNotify(string.Empty);
BITCommands.Excute(evt.newValue);
}
}
}

View File

@@ -4,7 +4,6 @@ using UnityEditor.Build.Reporting;
using UnityEngine;
using UnityEditor.Callbacks;
using System.IO;
using BITModel;
using Newtonsoft.Json;
namespace BITKit
{

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Cysharp.Threading.Tasks;
using UnityEngine;
@@ -15,9 +16,13 @@ namespace BITKit.Steamwork
internal static SteamService Singleton;
[Header(Constant.Header.Settings)]
[SerializeField]private uint appId=480;
[Header(Constant.Header.Settings)]
[SerializeField] private TextAsset allowCharacters;
//接口实现
public ulong SteamId => SteamClient.SteamId;
public string Name => SteamClient.Name;
public string Name => SteamClient.Name.Where(x=>allowCharacters.text.Contains(x)).Aggregate("",(current, c) => current+c);
public bool IsInitialized=>SteamClient.IsValid&&SteamClient.IsLoggedOn;
public async UniTask<Texture2D> GetAvatarAsync(CancellationToken token)
{