1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- using UnityGameFramework.Runtime;
- using X2Battle;
- /// <summary>
- /// 场景组件 减速带 渗水池 进入增加buff 离开移除buff
- /// </summary>
- public class SceneEventSeepbumpLogic : MonoBehaviour
- {
- private float speed = 0;
- private void Awake()
- {
-
- }
- // Start is called before the first frame update
- void Start()
- {
- SceneCmptManager.Instance.AddMechanism(this.gameObject);
- }
- public void OnTriggerEnter(Collider collider)
- {
- Role role = collider.GetComponent<Role>();
- if (!role || role.isDie)
- {
- return;
- }
- X2Battle.X2BattleManager.Instance.mBulletModel.OnCastSkill(
- 0, "711002",
- false, EBulletCastPoint.ECAST_POINT_DEFLUAT, role.mData.UID, false);
- SceneCmptManager.Instance.OpenMechanism(this.gameObject);
- //speed = role.GetPropertyFinal(YLBattle.EBattleProperty.MOVESPEED);
- //role.SetPropertyFinal(null,YLBattle.EBattleProperty.MOVESPEED, 0.3f);
- //// buff挂载
- //YLBattle.FieldEvent field = new YLBattle.FieldEvent();
- //field.PutValue("tid", "801003");
- //field.PutValue("skill", "0");
- //field.PutValue("level", "1");
- //field.PutValue("caster", "0");
- //field.PutValue("target", role.ID());
- //field.PutValue("skilltype", "7");
- //field.PutValue("tipdelay", 0.ToString());
- //X2BattleManager.Instance.mBuffModel.OnBuff(field);
- }
- public void OnTriggerExit(Collider collider)
- {
- Animator anim = this.GetComponent<Animator>();
- //anim.Play("full");
- Role role = collider.GetComponent<Role>();
- role.SetPropertyFinal(null, YLBattle.EBattleProperty.MOVESPEED, speed);
- }
- public void EnableCollider()
- {
- }
- public void OnClickInteractive()
- {
-
- }
- }
|