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