|
| static void | Shake (Transform t, string id, float magnitude) |
| |
| static void | Shake (Component t, string id, float magnitude=1f) |
| |
| static void | ShakeCam (string id="default", float magnitude=1f) |
| |
Definition at line 4 of file Shaker.cs.
◆ Shake() [1/2]
| static void Shaker.Shake |
( |
Component |
t, |
|
|
string |
id, |
|
|
float |
magnitude = 1f |
|
) |
| |
|
inlinestatic |
Definition at line 20 of file Shaker.cs.
21 {
22 Shake(t.transform,
id, magnitude);
23 }
static void Shake(Transform t, string id, float magnitude)
References Shake().
◆ Shake() [2/2]
| static void Shaker.Shake |
( |
Transform |
t, |
|
|
string |
id, |
|
|
float |
magnitude |
|
) |
| |
|
inlinestatic |
Definition at line 6 of file Shaker.cs.
7 {
8 DOTween.Kill(t);
10 int num = ((
Random.Range(0, 2) == 0) ? 1 : (-1));
11 int num2 = ((
Random.Range(0, 2) == 0) ? 1 : (-1));
12 _ = t.transform.localPosition;
13 t.transform.localPosition = Vector3.zero;
14 ((shakerProfile.type ==
ShakerProfile.
Type.Shake) ? t.DOShakePosition(shakerProfile.
duration,
new Vector2((
float)num * shakerProfile.
power, (float)num2 * shakerProfile.
power) * magnitude, shakerProfile.
vibrato) : t.DOPunchPosition(
new Vector2((
float)num * shakerProfile.
power, (float)num2 * shakerProfile.
power) * magnitude, shakerProfile.
duration, shakerProfile.
vibrato, shakerProfile.
elasticity)).OnComplete(delegate
15 {
16 t.localPosition = Vector3.zero;
17 });
18 }
References ShakerProfile.duration, ShakerProfile.elasticity, ShakerProfile.power, Random, and ShakerProfile.vibrato.
Referenced by Shake(), and ShakeCam().
◆ ShakeCam()
| static void Shaker.ShakeCam |
( |
string |
id = "default", |
|
|
float |
magnitude = 1f |
|
) |
| |
|
inlinestatic |
The documentation for this class was generated from the following file: