private void OnMove(MoveEvent moveEvent) { //Play the soundfor the attack if (PlaySound != null) { PlaySound(moveEvent.baseGO); } //Playt the particle for the attack if (PlayParticle != null) { PlayParticle(moveEvent.baseGO); } //Play the aanimation for the attack if (PlayAnimation != null) { PlayAnimation(moveEvent.baseGO); } }
private void OnDestroy() { MoveEvent.UnregisterListener(OnMove); }
private void Start() { MoveEvent.RegisterListener(OnMove); }