Example #1
0
        public bool Hurt(float damage, DamageType type = DamageType.Unknown)
        {
            var handler = type.GetUniversalDamageHandler();

            handler.Damage = damage;
            return(PlayerStats.DealDamage(handler));
        }
Example #2
0
        public Ragdoll CreateRagDoll(RoleType role, DamageType damage, Vector3 pos, Quaternion rot, Vector3 scale, string nick)
        {
            var rag = CreateNetworkObject(Prefabs[role], pos, rot, scale);

            rag.NetworkInfo = new RagdollInfo(Server.Get.Host, damage.GetUniversalDamageHandler(), role, pos, rot, nick, NetworkTime.time);

            var srag = new Ragdoll(rag);

            Map.Get.Ragdolls.Add(srag);
            return(srag);
        }
Example #3
0
 public override void Refresh()
 {
     Ragdoll.ragdoll.NetworkInfo = new RagdollInfo(Server.Get.Host, DamageType.GetUniversalDamageHandler(), RoleType, Position, Rotation, Nick, Ragdoll.ragdoll.NetworkInfo.CreationTime);
     base.Refresh();
 }