123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- //using UnityEngine;
- //using System.Collections;
- //using System.Collections.Generic;
- ///// <summary>
- /////
- ///// </summary>
- //public class TestCastSkill : MonoBehaviour
- //{
- // public Transform m_EffectParent = null;
- // public Transform m_Target = null;
- // public Transform m_Start = null;
- // /// <summary>
- // ///
- // /// </summary>
- // private GameObject mBtnCastSkill = null;
- // public GameObject m_ReadyEffect = null;
- // public GameObject m_ShootEffect = null;
- // public GameObject m_SendEffect = null;
- // public GameObject m_BombEffect = null;
- // /// <summary>
- // /// 投射层.
- // /// </summary>
- // public LayerMask layerMask;
- // /// <summary>
- // ///
- // /// </summary>
- // void Start()
- // {
- // CameraManager.Instance.Init();
- // this.mBtnCastSkill = this.transform.Find("BtnCastSkill").gameObject;
- // EventTriggerListener.Get(mBtnCastSkill).onClick = OnBtnCastSkill;
- // layerMask.value = 1 << 11;
- // }
-
- // /// <summary>
- // /// 初始化各个效果需要的数据
- // /// </summary>
- // void InitEffectData()
- // {
-
- // }
- // /// <summary>
- // /// 释放技能
- // /// </summary>
- // /// <param name="obj"></param>
- // public void OnBtnCastSkill(GameObject obj)
- // {
- // LogHelper.Log("enter");
- // GameObject temp = (GameObject)Instantiate(this.m_SendEffect);
- // temp.transform.SetParent(m_EffectParent);
-
- // ProjectileArcGUI proj = temp.AddComponent<ProjectileArcGUI>();
- // temp.SetActive(false);
- // Transform[] all = temp.GetComponentsInChildren<Transform>();
- // foreach (Transform rc in all)
- // {
- // rc.gameObject.layer = LayerMask.NameToLayer("BattleScreen"); //指定Layer
- // }
- // temp.SetActive(true);
- // proj.init(m_Start.position, m_Target.position, m_Target, layerMask, 1.0f, 10.0f, 0);
-
- // }
- // /// <summary>
- // /// 处理一下~
- // /// </summary>
- // /// <param name="model"></param>
- // /// <param name="trgPos"></param>
- // public void BattleEffectHandle(Transform model, Vector3 trgPos)
- // {
- // Transform[] all = model.GetComponentsInChildren<Transform>();
- // foreach (Transform rc in all)
- // {
- // rc.gameObject.layer = LayerMask.NameToLayer("BattleScreen"); //指定Layer
- // }
- // Vector3 trgUIPos = Vector3.zero;
- // Vector3 screenPosStart = CameraManager.Instance.Battle3D.WorldToViewportPoint(trgPos);
- // Vector3 pos = CameraManager.Instance.BattleScreenEffect.ViewportToWorldPoint(screenPosStart);
- // trgUIPos = new Vector2(pos.x, pos.y);
- // model.transform.SetParent(transform);
- // model.transform.position = trgUIPos;
- // model.transform.rotation = Quaternion.identity;
- // model.transform.localScale = new Vector3(1, 1, 1);
- // }
- // /// <summary>
- // ///
- // /// </summary>
- // void Update()
- // {
- // }
- //}
|