12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using Adon.Game.BO;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace AdonGameKit
- {
- /// <summary>
- /// boss子弹(boss2麻痹弹)
- /// </summary>
- public class BossBullet2001001 : MonoBehaviour
- {
- /// <summary>
- /// 子弹步进速度
- /// </summary>
- public float velocity = 300f;
- /// <summary>
- /// 生命周期
- /// </summary>
- public float lifeTime = 5f;
- float timer = 0f; // 子弹生命周期计时
- public BaseMonsterAdon m_BaseMonsterAdon;
- public void SetMonster(BaseMonsterAdon monster)
- {
- m_BaseMonsterAdon = monster;
- }
- void Awake()
- {
- }
- // Start is called before the first frame update
- void Start()
- {
-
- }
- void FixedUpdate()
- {
- //Vector3 step = transform.forward * Time.deltaTime * velocity;//子弹步进
- //// 生命周期到了则销毁
- //if (timer >= lifeTime)
- // OnProjectileDestroy();
- //transform.position += step;//向前步进
- //timer += Time.deltaTime;
- }
- /// <summary>
- /// 武器技能触发事件
- /// </summary>
- /// <param name="collision"></param>
- void OnTriggerEnter(Collider collision)
- {
- if (collision.gameObject.layer == LayerMask.NameToLayer("Player"))//玩家层
- {
- Debug.Log("碰撞敌人");
- // //Debug.Log("OnTriggerEnter:" + collision.gameObject.name);
- BaseHero component = collision.gameObject.GetComponent<BaseHero>();
- //发送战斗信息,等待后台处理逻辑返回数据
- //X2Battle.X2BattleManager.Instance.mBulletModel.OnCastSkill(
- // m_BaseMonsterAdon.mData.UID, m_BaseMonsterAdon.mData.GetSKillNormal(m_BaseMonsterAdon.m_SkillId, m_BaseMonsterAdon.m_CurAttackIdx),
- // false, X2Battle.EBulletCastPoint.ECAST_POINT_DEFLUAT, component.mData.UID, false);
- BulletMessage.catSkillFun(m_BaseMonsterAdon.mData.UID, m_BaseMonsterAdon.mData.GetSKillNormal(7, 1),
- false, (int)X2Battle.EBulletCastPoint.ECAST_POINT_DEFLUAT, component.mData.UID, false);
- }
- }
- }
- }
|