/// <summary> /// /// </summary> public HealthEventData(float delta, EntityEventHandler damager = null, Vector3 hitPoint = default(Vector3), Vector3 hitDirection = default(Vector3), float hitImpulse = 0f) { Delta = delta; Damager = damager; HitPoint = hitPoint; HitDirection = hitDirection; HitImpulse = hitImpulse; }
public void Launch(EntityEventHandler entityThatLaunched) { if (m_Launched) { Debug.LogWarningFormat(this, "Already launched this projectile!", name); return; } m_EntityThatLaunched = entityThatLaunched; m_Rigidbody.velocity = transform.forward * m_LaunchSpeed; m_Launched = true; }
private void Awake() { m_ParentEntity = GetComponentInParent <EntityEventHandler>(); if (!m_ParentEntity) { Debug.LogErrorFormat(this, "[This HitBox is not under an entity, like a player, animal, etc, it has no purpose.", name); enabled = false; return; } m_Collider = GetComponent <Collider>(); m_Rigidbody = GetComponent <Rigidbody>(); }
private void On_CannibalDeath(EntityEventHandler cannibal) { m_AliveCannibals.Remove(cannibal); }
public Gunshot(Vector3 position, EntityEventHandler entityThatShot = null) { Position = position; EntityThatShot = entityThatShot; }