-
Notifications
You must be signed in to change notification settings - Fork 7
/
Rocket.cs
52 lines (37 loc) · 1.41 KB
/
Rocket.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
using UnityEngine;
using Steamworks; // Requires CSteamID.cs
namespace SDG.Unturned
{
// Creates an explosion when an object collides with the collider component on the object with this script.
// Damage and damage range can be specified for each damagable entity.
// If the object which collides with the collider is the transform ignoreTransform or a child of ignoreTransform it will not explode.
// When the rocket explodes it is completely destroyed and cannot be reset.
// The rocket will not move on its own so it can be used as a stationary trap or an Apply Force and Rigidbody component can be added to make it move.
public class Rocket : MonoBehaviour
{
public CSteamID killer;
// Explosion Damage Radius
public float range;
public float playerDamage;
public float zombieDamage;
public float animalDamage;
public float barricadeDamage;
public float structureDamage;
public float vehicleDamage;
public float resourceDamage;
public float objectDamage;
// ID of the effect to be played when rocket explodes
public ushort explosion;
public bool penetrateBuildables;
public Transform ignoreTransform;
public ERagdollEffect ragdollEffect;
}
public enum ERagdollEffect
{
NONE,
BRONZE,
SILVER,
GOLD,
ZERO_KELVIN
}
}