// Update is called once per frame void Update() { RefreadEndPosition(); Vector3 p = transform.position; if (/* null== target || */ KingSoftMath.MoveTowards(ref p, target.transform.position, speed * Time.deltaTime)) { if (displayInfor != null && displayInfor.CameraEffect.CompareTo("SHAKE_BULLET_HIT") == 0) { Shake(); } if (displayInfor.SoundType == KSkillDisplay.ACTION_AUIDO_TYPE.Hit) { if (displayInfor.Sound.Length > 0) { AudioManager.instance.PlaySound3d(displayInfor.Sound, hero.Position); } } msg_case.PopMessage(hero); gameObject.AddComponent <DestoryObject>(); } else { KingSoftCommonFunction.NearPosition(p); transform.position = p; } }
public virtual void PopMsg() { if (null != msg_case) { msg_case.PopMessage(hero); } }