Maid knife's collider is biiger on initial pickup
This commit is contained in:
parent
a46f833b27
commit
ab02b47d77
@ -218,6 +218,9 @@ namespace ScarletMansion.GamePatch.Enemies {
|
||||
// Token: 0x04000118 RID: 280
|
||||
private float berserkModeTimer;
|
||||
|
||||
[Header("Maid")]
|
||||
public Collider mainCollider;
|
||||
public BoxCollider deathCollider;
|
||||
public AnimationCurve footstepCurve;
|
||||
|
||||
public const float WALKING_SPEED_TO_ANIMATION_SPEED = 1.646f;
|
||||
@ -272,6 +275,9 @@ namespace ScarletMansion.GamePatch.Enemies {
|
||||
|
||||
knifeRender.SetActive(false);
|
||||
|
||||
mainCollider.enabled = false;
|
||||
deathCollider.enabled = true; // cause their hitbox should be gone
|
||||
|
||||
if (IsServer) {
|
||||
if (ConfigMain.Instance.revEnemyValue.enabled){
|
||||
var enemy = ScarletNetworkManagerUtility.CreateEnemyWithType<KnightGhostVariant>(knightGhostEnemy, transform.position, 0f);
|
||||
|
@ -11,9 +11,7 @@ using ScarletMansion.DunGenPatch;
|
||||
using LethalLib.Modules;
|
||||
using Unity.Netcode;
|
||||
using LethalLevelLoader;
|
||||
using static UnityEngine.GraphicsBuffer;
|
||||
using ScarletMansion.GamePatch.Components;
|
||||
using System.Security.Cryptography;
|
||||
using ScarletMansion.GamePatch.Enemies;
|
||||
using UnityEngine.UI;
|
||||
using ScarletMansion.GamePatch.Items;
|
||||
|
@ -39,10 +39,23 @@ namespace ScarletMansion.GamePatch.Items
|
||||
public ParticleSystem buffedParticleSystem;
|
||||
public MeshRenderer knifeRenderer;
|
||||
|
||||
[Header("Colliders")]
|
||||
public BoxCollider boxCollider;
|
||||
public Bounds maidBounds;
|
||||
public Bounds defaultBounds;
|
||||
|
||||
void Awake(){
|
||||
defaultBounds.center = boxCollider.center;
|
||||
defaultBounds.size = boxCollider.size;
|
||||
}
|
||||
|
||||
public override void EquipItem() {
|
||||
base.EquipItem();
|
||||
playerHeldBy.equippedUsableItemQE = true;
|
||||
parentMaid = null;
|
||||
|
||||
boxCollider.center = defaultBounds.center;
|
||||
boxCollider.size = defaultBounds.size;
|
||||
}
|
||||
|
||||
public override void LateUpdate(){
|
||||
@ -50,6 +63,9 @@ namespace ScarletMansion.GamePatch.Items
|
||||
if (parentMaid) {
|
||||
transform.position = parentMaid.knifeRenderTransform.position;
|
||||
transform.rotation = parentMaid.knifeRenderTransform.rotation;
|
||||
|
||||
boxCollider.center = Vector3.Lerp(boxCollider.center, maidBounds.center, Time.deltaTime * 5f);
|
||||
boxCollider.size = Vector3.Lerp(boxCollider.size, maidBounds.size, Time.deltaTime * 5f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace ScarletMansion {
|
||||
|
||||
[BepInDependency("imabatby.lethallevelloader", "1.4.5")]
|
||||
[BepInDependency("evaisa.lethallib", "0.13.2")]
|
||||
[BepInDependency("dev.ladyalice.dungenplus", "1.3.4")]
|
||||
[BepInDependency("dev.ladyalice.dungenplus", "1.4.0")]
|
||||
[BepInDependency("dev.ladyalice.scarletmansion.foyer")]
|
||||
[BepInDependency("dev.ladyalice.scarletmansion.basement")]
|
||||
//[BepInDependency(ModCompability.advancedCompanyGuid, BepInDependency.DependencyFlags.SoftDependency)]
|
||||
@ -37,7 +37,7 @@ namespace ScarletMansion {
|
||||
public class Plugin : BaseUnityPlugin {
|
||||
public const string modGUID = "dev.ladyalice.scarletmansion";
|
||||
private const string modName = "Scarlet Devil Mansion";
|
||||
private const string modVersion = "2.2.2";
|
||||
private const string modVersion = "2.3.0";
|
||||
|
||||
public readonly Harmony harmony = new Harmony(modGUID);
|
||||
|
||||
|
@ -229,6 +229,7 @@ namespace ScarletMansion {
|
||||
return comp as T;
|
||||
}
|
||||
|
||||
/*
|
||||
public static void PrintToParent(Transform t) {
|
||||
Plugin.logger.LogDebug(t.name);
|
||||
var parent = t.parent;
|
||||
@ -239,6 +240,7 @@ namespace ScarletMansion {
|
||||
parent = parent.parent;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public static (int totalMinutes, int hours, int minutes) GetTime(){
|
||||
var timeOfDay = TimeOfDay.Instance;
|
||||
|
Loading…
x
Reference in New Issue
Block a user