private void spawnProjectile() { PropProjectile propProjectile = UnityEngine.Object.Instantiate(ProjectilePrefab); CameraCullingMaskHelper.SetLayerRecursive(propProjectile.transform, "AllPlayerInteractibles"); propProjectile.WorldStart = prop.transform.position; propProjectile.WorldDestination = prop.OnUseDestination; propProjectile.transform.forward = prop.PropUserRef.transform.forward; if (this.ProjectileInstanceCreated != null) { this.ProjectileInstanceCreated(propProjectile); } }
public void Hit(PropProjectile prop, float damage = 100) { if (isDead) return; ApplyDamage(damage + Player.Inst.DamageBonus); // Stun coroutine StartCoroutine(Stun(1)); }
private void onProjectileInstanceCreated(PropProjectile propProjectile) { propProjectile.RevealSpawned = true; propProjectile.SpawnedPropExperience = propSpawnOnUse.SpawnedInstance; }