This commit is contained in:
CortexCore
2023-11-06 01:17:23 +08:00
parent bd40165ade
commit 5446067f91
114 changed files with 2023 additions and 414 deletions

View File

@@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using BITKit;
using UnityEngine.Events;
@@ -22,13 +23,14 @@ namespace BITKit
sinleton = this;
DI.Register(this);
}
public Transform Spawn(VFXMessage message)
public Transform Spawn(RaycastHit hit, params string[] keyWords)
{
if (Data.TryGetValue<Transform>(message.path, out var vfx))
return Spawn(new Location()
{
return Instantiate(vfx, message.location, message.location);
}
return null;
position = hit.point,
rotation = Quaternion.LookRotation(hit.normal),
forward = hit.normal,
}, keyWords);
}
public Transform Spawn(Location location, params string[] keyWords)
{