-
Notifications
You must be signed in to change notification settings - Fork 2
/
DarkwindDistortionManager.cs
93 lines (69 loc) · 3.51 KB
/
DarkwindDistortionManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//Player Choice: The Class. (bless that day with Zee)
public class DarkwindDistortionManager : MonoBehaviour
{
public static DarkwindDistortionManager globalInstance;
//Remind yourself... The greater the power, the lesser the glory!
public int newMaxHealth;
public bool noManaLimitOnSpellwords = false;
public enum Chaindash { Normal, Disabled, Infinite };
public Chaindash playerChaindash = Chaindash.Normal;
[Tooltip("If you have any influenceX, should it get reset to 0, if you reach idle state? "
+ "\nBy default yes, otherwise, you will slide off the last-built momentum which is more natural but also seems janky")]
public bool allowIdleSlide = false;
[Tooltip("Determines if you can stack momentum on a ground wall (aka cheese it by getting as much speed you want from a ground wall)")]
public bool allowGroundWallSpeedCheese = false;
[Tooltip("No matter how fast you go, the game allows you to go up to 200 InfluenceX. True if you want to exceed the 200.")]
public bool allowInfiniteSpeedMomentum = false;
//If true, you can jump only with buttons and triggers.
//public bool disableJumpFromJoystick = false;//Disabled because it needs a lot of refactoring on jump and its input to trigger it.
/// <summary>
/// Accepts only inputs that are different than previous inputs.
/// </summary>
public bool ignoreSameAttackJoystickInput = false;
/// <summary>
/// Accepts only inputs that have a radius of 1 aka the whole perimeter.
/// In other words, act as a tilt stick, and take only the edges.
/// </summary>
public bool acceptAttackInputOnlyOnJoystickEdges = true;
/// <summary>
/// When P2 dashes, and P1 runs on opposite direction, after he stops running and influenceX still pushes him opposite to running
/// Should it pull him backwards (with dat unfitting animation) properly, or just influenceX = 0 and ggwp?
/// </summary>
public bool allowReverseDarkwindPull = false;
//When to regain walljump? Touching horizontal ground ofc, and when else? On kill enemy? On taking damage/hit?
public enum WallJumpReset { GroundOnly, Hit, Kill, KillAndHit};
public WallJumpReset playerWalljumpReset = WallJumpReset.KillAndHit;
public enum CrouchDashRestore { Perfect, Lazy };
public CrouchDashRestore playerCrouchDashRestore = CrouchDashRestore.Perfect;
public enum WallJumpingLimit { Never, Once, Twice, Infinite};
public WallJumpingLimit playerWallJumpingLimit = WallJumpingLimit.Once;
//Unused.
public enum InversedCameraOptions { None, FlipX, FlipY, FlipBoth};
public InversedCameraOptions mainCameraInversedOptions = InversedCameraOptions.None;
/// <summary>
/// Making this just in case a controller is broken or sensitivity is wrong, so it can be tweaked.
/// Obviously, the default is 1.
/// </summary>
public float RightJoystickRadius = 1f;
private WarriorHealth warriorHealthScript;
private void Awake()
{
globalInstance = this;
warriorHealthScript = GameObject.FindGameObjectWithTag("Player").GetComponent<WarriorHealth>();
}
public void AddMaxHealth(int newMaxHealth)
{
warriorHealthScript.AddMaxHealth(newMaxHealth);
}
public void ResetMaxHealth()
{
warriorHealthScript.MaxHealth = warriorHealthScript.defaultMaxHealth;
}
public int GetCurrentMaxHealth()
{
return warriorHealthScript.MaxHealth;
}
}