- PortalTestDestination practice range: Valorant-style hitscan rifle (recoil, spray/bloom, reload, controller support), debug HUD, practice-dummy targets with head/body hitboxes, hit/death/respawn animations, procedural SFX/FX - AK47 model (Quaternius, CC0) held via Animator IK, with fire/reload/equip anims - Intro cinematic (camera shots, title card, target beam-in, GO hand-off) - Scene dressing editor pass: CC0 textures, props, warehouse roof, lighting and post-processing; custom stylized skybox shader - CharacterMovement: camera recoil, shoulder offset, cinematic control lock - Unity CLI pipeline package; plus in-progress chat/Rive/player changes Asset credits: Assets/Models/Props/PROPS_CREDITS.txt (3 CC-BY 3.0 props), Assets/Textures/Range/TEXTURES_LICENSE.txt, Assets/Resources/*/..._LICENSE.txt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
749 B
C#
27 lines
749 B
C#
using UnityEngine;
|
|
|
|
// Tiny self-animating effect: squeezes the object's X/Z to nothing (and stretches Y) over
|
|
// `duration`, then destroys it. Used for the target spawn beam.
|
|
public class FxShrink : MonoBehaviour
|
|
{
|
|
public float duration = 0.45f;
|
|
public float stretch = 1.6f;
|
|
|
|
Vector3 startScale;
|
|
float startTime;
|
|
|
|
void Start()
|
|
{
|
|
startScale = transform.localScale;
|
|
startTime = Time.time;
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
float t = Mathf.Clamp01((Time.time - startTime) / duration);
|
|
float squeeze = 1f - t * t;
|
|
transform.localScale = new Vector3(startScale.x * squeeze, startScale.y * Mathf.Lerp(1f, stretch, t), startScale.z * squeeze);
|
|
if (t >= 1f) Destroy(gameObject);
|
|
}
|
|
}
|