void Awake() { gunParticles = GetComponent <ParticleSystem>(); gunLine = GetComponent <LineRenderer>(); gunAnim = transform.parent.GetComponent <GunAnimation>(); gunSound = GetComponent <GunSound>(); }
private void Start() { animAction = GetComponent <EnemyAnimation>(); motor = GetComponent <EnemyMotor>(); gun = GetComponent <Gun>(); gunAnim = GetComponent <GunAnimation>(); }
//为子类提供重写Start方法的机会 protected virtual void Start() { ammoUi = GameObject.Find("ammo").GetComponentInChildren <Text>(); // print("Gun-Start"); anim = GetComponent <GunAnimation>(); muzzleFlash = GetComponentInChildren <MuzzleFlash>(); audioSource = GetComponent <AudioSource>(); }
public void Awake() { gun = GetComponent <Gun>(); animation = GetComponent <GunAnimation>(); }
//为子类提供重写的机会 protected virtual void Stark() { anim = GetComponent <GunAnimation>(); }
public void Start() { animation = GetComponent <GunAnimation>(); }
private void Start() { source = GetComponent <AudioSource>(); anim = GetComponent <GunAnimation>(); flash = firePoint.GetComponent <MuzzleFlash>(); }