11
This commit is contained in:
@@ -10,6 +10,7 @@ using Net.BITKit.Localization;
|
||||
using Net.Like.Xue.Tokyo.UX;
|
||||
using Net.Project.B.AI;
|
||||
using Net.Project.B.Chat;
|
||||
using Net.Project.B.Health;
|
||||
using Net.Project.B.PDA;
|
||||
using Net.Project.B.UX;
|
||||
using Project.B.Player;
|
||||
@@ -84,9 +85,16 @@ namespace Net.Like.Xue.Tokyo
|
||||
|
||||
await global::Project.B.Program.BuildServiceProvider(serviceProvider,destroyCancellationToken);
|
||||
|
||||
serviceProvider.QueryComponents(out AIHumanService aiHumanService);
|
||||
{
|
||||
serviceProvider.QueryComponents(out AIHumanService aiHumanService);
|
||||
|
||||
aiHumanService.DamageOnBreakDialogue = 30;
|
||||
}
|
||||
{
|
||||
serviceProvider.QueryComponents(out PlayerAutoHealController healController);
|
||||
healController.Enabled = false;
|
||||
}
|
||||
|
||||
|
||||
var uxService = serviceProvider.GetRequiredService<IUXService>();
|
||||
|
||||
|
35
Assets/Artists/Scripts/ReplaceModel.cs
Normal file
35
Assets/Artists/Scripts/ReplaceModel.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines.Primitives;
|
||||
using UnityEngine;
|
||||
using Object = System.Object;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace Net.Like.Xue.Tokyo
|
||||
{
|
||||
public class ReplaceModel : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Animator animator;
|
||||
[SerializeField] private Transform[] models;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
for (var i = 0; i < transform.childCount; i++)
|
||||
{
|
||||
DestroyImmediate(transform.GetChild(0));
|
||||
}
|
||||
|
||||
var index = Random.Range(0, transform.childCount);
|
||||
var newModel =models[index];
|
||||
newModel = Instantiate(newModel, transform);
|
||||
if (newModel.TryGetComponent<Animator>(out var x))
|
||||
{
|
||||
DestroyImmediate(x);
|
||||
}
|
||||
|
||||
animator.Rebind();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
11
Assets/Artists/Scripts/ReplaceModel.cs.meta
Normal file
11
Assets/Artists/Scripts/ReplaceModel.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf723c8e5514e9c4399e56529ffc991b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user