public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if(detected){ ActionCam.ActionBullet (2.0f); ActionCam.ObjectLookAt = null; ActionCam.SlowmotionNow (0.1f, 1.6f); ActionCam.Follow = false; ActionCam.SetPosition (ActionCam.transform.position, ActionCam.Detected); ActionCam.ResetFOV(); }else{ // in case of missed prediction of hit point. // action camera will try to get new position as close as hit point ActionCam.FOVTarget = 20; ActionCam.ActionBullet (2.0f); ActionCam.ObjectLookAt = null; ActionCam.SlowmotionNow (0.1f, 1.6f); ActionCam.Follow = false; ActionCam.SetPosition (point - bullet.transform.forward * 5 * ZoomMulti, false); ActionCam.lookAtPosition = point; } base.TargetHited (bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (detected) { ActionCam.ActionBullet(2.0f); ActionCam.ObjectLookAt = null; ActionCam.SlowmotionNow(0.1f, 1.6f); ActionCam.Follow = false; ActionCam.SetPosition(ActionCam.transform.position, ActionCam.Detected); ActionCam.ResetFOV(); } else { // in case of missed prediction of hit point. // action camera will try to get new position as close as hit point ActionCam.FOVTarget = 20; ActionCam.ActionBullet(2.0f); ActionCam.ObjectLookAt = null; ActionCam.SlowmotionNow(0.1f, 1.6f); ActionCam.Follow = false; ActionCam.SetPosition(point - bullet.transform.forward * 5 * ZoomMulti, false); ActionCam.lookAtPosition = point; } base.TargetHited(bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (ActionCam.Detected) { ActionCam.ObjectLookAt = null; ActionCam.ActionBullet(3.0f); ActionCam.Follow = false; } else { ActionCam.ActionBullet(2.0f); ActionCam.ObjectLookAt = null; ActionCam.SlowmotionNow(0.1f, 1.6f); ActionCam.Follow = false; ActionCam.lookAtPosition = point; ActionCam.SetPositionDistance(point, true); } base.TargetHited(bullet, target, point); }
public virtual void OnHit(RaycastHit hit, AS_Bullet bullet) { if (DecayFX) { GameObject decay = (GameObject)GameObject.Instantiate(DecayFX, hit.point, Quaternion.identity); decay.transform.forward = bullet.transform.forward - (Vector3.up * 0.2f); GameObject.Destroy(decay, DecayDuration); } if (ParticleHit) { GameObject hitparticle = (GameObject)Instantiate(ParticleHit, hit.point, hit.transform.rotation); hitparticle.transform.forward = hit.normal; if (ParticleSticky) { hitparticle.transform.parent = this.transform; hitparticle.name = "FX"; } GameObject.Destroy(hitparticle, ParticleLifeTime); } if (ParticleFlow) { GameObject flowparticle = (GameObject)Instantiate(ParticleFlow, this.transform.position, hit.transform.rotation); flowparticle.transform.SetParent(bullet.transform); GameObject.Destroy(flowparticle, ParticleParticleFlowLifeTime); } }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } base.TargetDetected(bullet, target, point); }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target,Vector3 point) { if (!ActionCam) { return; } base.TargetDetected (bullet, target, point); }
// When bullet start and detected a target on the way. public virtual void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } ActionCam.Detected = true; ActionCam.ObjectLookAtRoot = target.RootObject; //Debug.Log("State : FirstDetected"); }
public virtual void OnHit(RaycastHit hit, AS_Bullet bullet) { if (DecayFX) { GameObject decay = (GameObject)GameObject.Instantiate(DecayFX, hit.point, Quaternion.identity); decay.transform.forward = bullet.transform.forward - (Vector3.up * 0.2f); GameObject.Destroy(decay, DecayDuration); } }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target,Vector3 point) { if (!ActionCam) { return; } ActionCam.ClearTarget(); ActionCam.ResetFOV(); base.TargetHited (bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } ActionCam.SlowmotionNow(0.1f, 1); base.TargetHited(bullet, target, point); }
public override void OnHit(RaycastHit hit, AS_Bullet bullet) { float distance = Vector3.Distance (bullet.pointShoot, hit.point); if (damageManage) { int damage = (int)((float)bullet.Damage * DamageMult); damageManage.ApplyDamage (damage, bullet.transform.forward * bullet.HitForce, distance, Suffix); } AddAudio (hit.point); base.OnHit (hit, bullet); }
// When bullet flying and detected a target on the way. public virtual void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } //Debug.Log ("Running Detect target : " + target.name + " > "+ActionCam.Detected + " time "+Time.time); ActionCam.Detected = true; ActionCam.ObjectLookAtRoot = target.RootObject; //Debug.Log("State : TargetDetected"); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } ActionCam.ClearTarget(); ActionCam.ResetFOV(); base.TargetHited(bullet, target, point); }
public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target,Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.InAction) { ActionCam.Slowmotion (0.5f, 0.3f); } base.FirstDetected (bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.Detected) { ActionCam.SetPositionDistance(target.transform.position, false); } }
public override void OnHit(RaycastHit hit, AS_Bullet bullet) { float distance = Vector3.Distance(bullet.pointShoot, hit.point); if (damageManage) { int damage = (int)((float)bullet.Damage * DamageMult); damageManage.ApplyDamage(damage, bullet.transform.forward * bullet.HitForce, distance, Suffix); } AddAudio(hit.point); base.OnHit(hit, bullet); }
public override void OnHit(RaycastHit hit, AS_Bullet bullet) { AddAudio(hit.point); if (damageManage) { damageManage.ApplyDamage(bullet.Damage, bullet.transform.forward * bullet.HitForce, 0f); vp_DamageInfo info = new vp_DamageInfo(bullet.Damage, bullet.source, vp_DamageInfo.DamageType.Bullet); // SendMessageUpwards("OnMessage_HUDDamageFlash", info, SendMessageOptions.DontRequireReceiver); gameObject.BroadcastMessage("OnMessage_HUDDamageFlash", info, SendMessageOptions.DontRequireReceiver); } base.OnHit(hit, bullet); }
public override void OnHit(RaycastHit hit, AS_Bullet bullet) { AddAudio(hit.point); //Halt the enemy, and have the enemy actually take damage after the cool vfx. //(The begin event for the action camera is called in the base class's OnHit) GetComponent <Enemy>().Speed = 0; ActionCam.EndAction += () => { GetComponent <Enemy>().OnBulletHit(bullet.Damage); }; base.OnHit(hit, bullet); }
// When bullet start and detected a target on the way. public virtual void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } ActionCam.BaseDistance = BaseDistance; ActionCam.Detected = true; ActionCam.ObjectLookAtRoot = target.RootObject; ActionCam.TargetShouldHit = target.gameObject; ActionCam.PositionFirstDetect = bullet.transform.position; //Debug.Log("State : FirstDetected"); }
// When bullet hit target public virtual void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } //Debug.Log("Hit : "+target.name + " > "+ ActionCam.Detected +" time "+Time.time); ActionCam.BaseDistance = BaseDistance; ActionCam.HitTarget = true; //ActionCam.ObjectLookAtRoot = target.RootObject; ActionCam.PositionHit = point; //Debug.Log("State : TargetHited"); }
public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target,Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.InAction) { ActionCam.Follow = true; ActionCam.SetPosition (bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * 2 * ZoomMulti), false); ActionCam.Slowmotion (0.1f, 1.0f); } base.FirstDetected (bullet, target, point); }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target,Vector3 point) { if (!ActionCam) { return; } ActionCam.lookAtPosition = point; ActionCam.Follow = false; ActionCam.SlowmotionNow (0.02f, 3); ActionCam.SetPositionDistance(point,false); ActionCam.ActionBullet (3.0f); ActionCam.SetFOV(35,true); base.TargetDetected (bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target,Vector3 point) { if (!ActionCam) { return; } if(!ActionCam.Detected){ ActionCam.SetPositionDistance(target.transform.position,false); } ActionCam.ResetFOV(); ActionCam.ObjectFollowing = null; ActionCam.Follow = false; ActionCam.ObjectLookAt = null; base.TargetHited (bullet, target, point); }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target,Vector3 point) { if (!ActionCam) { return; } ActionCam.ObjectLookAt = target.gameObject; ActionCam.Follow = false; ActionCam.Slowmotion (0.2f, 0.2f); ActionCam.SetPositionDistance(target.transform.position,false); ActionCam.ActionBullet (2.0f); Debug.Log(">>>"+ActionCam.ObjectLookAt); base.TargetDetected (bullet, target, point); }
// When bullet flying and detected a target on the way. public virtual void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } //Debug.Log ("Running Detect target : " + target.name + " > "+ActionCam.Detected + " time "+Time.time); ActionCam.BaseDistance = BaseDistance; ActionCam.Detected = true; ActionCam.ObjectLookAtRoot = target.RootObject; ActionCam.TargetShouldHit = target.gameObject; ActionCam.PositionFirstDetect = bullet.transform.position; //Debug.Log("State : TargetDetected"); }
public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.InAction) { ActionCam.Slowmotion(0.5f, 1); } base.FirstDetected(bullet, target, point); }
public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.InAction) { ActionCam.Follow = true; ActionCam.SetPosition(bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * 2 * ZoomMulti), false); } base.FirstDetected(bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.Detected) { ActionCam.SetPositionDistance(target.transform.position, false); } ActionCam.ObjectFollowing = null; ActionCam.Follow = false; ActionCam.ObjectLookAt = null; base.TargetHited(bullet, target, point); }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } ActionCam.ObjectLookAt = target.gameObject; ActionCam.Follow = false; ActionCam.Slowmotion(0.2f, 0.2f); ActionCam.SetPositionDistance(target.transform.position, false); ActionCam.ActionBullet(2.0f); Debug.Log(">>>" + ActionCam.ObjectLookAt); base.TargetDetected(bullet, target, point); }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } ActionCam.lookAtPosition = point; ActionCam.Follow = false; ActionCam.SlowmotionNow(0.02f, 3); ActionCam.SetPositionDistance(point, false); ActionCam.ActionBullet(10.0f); ActionCam.SetFOV(10, true, 0.1f); base.TargetDetected(bullet, target, point); }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.HitTarget) { ActionCam.Follow = true; ActionCam.ActionBullet (10.0f); ActionCam.Slowmotion (0.015f, 10f); ActionCam.LengthMult = 0.2f; ActionCam.SetPosition (bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * ZoomMulti), ActionCam.Detected); ActionCam.CameraOffset = Vector3.right; } base.TargetDetected (bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target,Vector3 point) { if (!ActionCam) { return; } if(!ActionCam.Detected){ ActionCam.SetPositionDistance(point,false); } ActionCam.ActionBullet (3.0f); ActionCam.SlowmotionNow (0.01f, 3); ActionCam.ObjectFollowing = null; ActionCam.Follow = false; ActionCam.ObjectLookAt = null; base.TargetHited (bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } ActionCam.ActionBullet(3.0f); ActionCam.ObjectLookAt = null; ActionCam.SlowmotionNow(0.02f, 1.0f); ActionCam.Follow = true; ActionCam.lookAtPosition = point; ActionCam.SetPosition(point + (target.transform.right * ZoomMulti) - (target.transform.forward * 2 * ZoomMulti), true); ActionCam.LengthMult = 0.5f; base.TargetHited(bullet, target, point); }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.HitTarget) { ActionCam.ObjectLookAt = bullet.gameObject; ActionCam.Follow = true; ActionCam.SlowmotionNow(0.02f, 3.0f); ActionCam.SetPosition(point + (target.transform.right * ActionCam.Length), false); ActionCam.ActionBullet(10.0f); } base.TargetDetected(bullet, target, point); }
public override void TargetDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.HitTarget) { ActionCam.Follow = true; ActionCam.ActionBullet(10.0f); ActionCam.Slowmotion(0.015f, 10f); ActionCam.LengthMult = 0.2f; ActionCam.SetPosition(bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * ZoomMulti), ActionCam.Detected); ActionCam.CameraOffset = Vector3.right; } base.TargetDetected(bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } ActionCam.SetPositionDistance(point, true); ActionCam.lookAtPosition = point; ActionCam.ActionBullet(2.0f); ActionCam.SlowmotionNow(0.03f, 1); ActionCam.SetFOV(20, true, 0.1f); ActionCam.ObjectFollowing = null; ActionCam.Follow = true; ActionCam.SetPosition(point - bullet.transform.forward * 5, false); base.TargetHited(bullet, target, point); }
public override void TargetHited(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.Detected) { ActionCam.SetPositionDistance(point, false); } ActionCam.ActionBullet(3.0f); ActionCam.SlowmotionNow(0.01f, 3); ActionCam.ObjectFollowing = null; ActionCam.Follow = false; ActionCam.ObjectLookAt = null; base.TargetHited(bullet, target, point); }
public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.InAction) { ActionCam.ObjectLookAt = bullet.gameObject; ActionCam.Follow = true; ActionCam.ActionBullet (10.0f); ActionCam.SlowmotionNow (0.5f, 3.0f); ActionCam.LengthMult = 0.2f; ActionCam.SetPosition (bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * ZoomMulti), ActionCam.Detected); ActionCam.CameraOffset = -Vector3.right; detected = true; } base.FirstDetected (bullet, target, point); }
public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.InAction) { ActionCam.ObjectLookAt = bullet.gameObject; ActionCam.Follow = true; ActionCam.ActionBullet(10.0f); ActionCam.SlowmotionNow(0.025f, 3.0f); ActionCam.LengthMult = 0.2f; ActionCam.SetPosition(bullet.transform.position + (bullet.transform.right * ZoomMulti) - (bullet.transform.forward * ZoomMulti), ActionCam.Detected); ActionCam.CameraOffset = -Vector3.right; } base.FirstDetected(bullet, target, point); }
public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { if (!ActionCam) { return; } if (!ActionCam.InAction) { ActionCam.ObjectLookAt = bullet.gameObject; ActionCam.Follow = true; ActionCam.ActionBullet(10.0f); //This is the method you wanna change when bullet is on it's path! ActionCam.SlowmotionNow(0.1f, 3.0f); ActionCam.LengthMult = 0.1f; ActionCam.SetPosition(bullet.transform.position + (bullet.transform.right) - (bullet.transform.forward), ActionCam.Detected); ActionCam.CameraOffset = ((bullet.transform.right) - (bullet.transform.forward)) * 0.2f; detected = true; } base.FirstDetected(bullet, target, point); }
public override void OnHit(RaycastHit hit, AS_Bullet bullet) { AddAudio(hit.point); base.OnHit(hit, bullet); }
public override void OnHit(RaycastHit hit, AS_Bullet bullet) { AddAudio (hit.point); base.OnHit (hit, bullet); }
public override void FirstDetected(AS_Bullet bullet, AS_BulletHiter target, Vector3 point) { base.FirstDetected(bullet, target, point); }