// Use this for initialization void Awake() { Instance = this; HUDRoot = bl_UHTUtils.GetHUDText; HPBars = new List <HPBarAgent>(); MyTools.SetActive(BossHPBar, false); }
// Use this for initialization void Start() { targetGo = GameController.Instance.GetPlayerByRoleID(targetRoleId); TranscriptManager.Instance.AddEnemy(this.gameObject); hpTotal = hp; transBloodPoint = transform.Find("BloodPoint").GetComponent <Transform>(); cc = this.GetComponent <CharacterController>(); InvokeRepeating("CalcDistance", 0, 0.1f); anim = this.GetComponent <Animation>(); hpbarPoint = transform.Find("HpBarPoint").GetComponent <Transform>(); //if (TranscriptManager.Instance.player != null) //{ // player = TranscriptManager.Instance.player.transform; //} hpBarGo = HpBarManager._instance.GetHpBar(hpbarPoint.gameObject); hpBarSlider = hpBarGo.GetComponent <Slider>(); hudTextGo = HpBarManager._instance.GetHudText(hpbarPoint.gameObject); hudText = hudTextGo.GetComponent <bl_HUDText>(); if (GameController.Instance.battleType == BattleType.Team && GameController.Instance.isMaster) { InvokeRepeating("CheckPositionAndRotation", 0, 1f / 30); InvokeRepeating("CheckAnimation", 0, 1 / 30f); } }
// Use this for initialization void Start() { targetGo = GameController.Instance.GetPlayerByRoleID(targetRoleId); player = targetGo.transform; TranscriptManager.Instance.AddEnemy(this.gameObject); hpTotal = hp; anim = this.GetComponent <Animator>(); rigidbody = this.GetComponent <Rigidbody>(); renderer = transform.Find("Object01").GetComponent <Renderer>(); attack01Go = transform.Find("attack01").gameObject; attack02Go = transform.Find("attack02").gameObject; attack03Point = transform.Find("attack03Point").GetComponent <Transform>(); hpbarPoint = transform.Find("HpBarPoint").GetComponent <Transform>(); transBloodPoint = transform.Find("BloodPoint").GetComponent <Transform>(); hudTextGo = HpBarManager._instance.GetHudText(hpbarPoint.gameObject); hudText = hudTextGo.GetComponent <bl_HUDText>(); BossHpBar.Instance.Show(hp); bossController = GetComponent <BossController>(); bossController.OnSyncBossAnimation += this.OnSyncBossAnimation; if (GameController.Instance.battleType == BattleType.Team && GameController.Instance.isMaster) { InvokeRepeating("CheckPositionAndRotation", 0, 1 / 30f); InvokeRepeating("CheckAnimation", 0, 1f / 30); } }
//private Color Darken() { //} private static void WriteText(HUDTextInfo info) { if (HUDRoot == null) { HUDRoot = bl_UHTUtils.GetHUDText; } HUDRoot.NewText(info); }
private void Start() { anim = GetComponent <Animation>(); cc = GetComponent <CharacterController>(); pi = GameObject.FindGameObjectWithTag(Tags.Player.ToString()).GetComponent <PlayerInfo>(); oriColor = mate.GetComponent <Renderer>().material.color; HUDRoot = GameObject.FindGameObjectWithTag(Tags.HUD.ToString()).GetComponent <bl_HUDText>(); }
protected override void Start() { HUDRoot = GameObject.Find("HUDText").GetComponent <bl_HUDText>(); HUDRoot.NewText("- " + Random.Range(50, 100).ToString(), base.transform, Color.red, 8, 20f, -1f, 2.2f, bl_Guidance.Static); HUDRoot.NewHealthyPoint(base.transform, 200, 8); HUDRoot.ChangeHPValue(HUDRoot.GetHealthyPoint(transform), 100, bl_HUDText.ValueType.damage); base.Start(); InitFsm(); }
public Vector3 Endpoint;//终点 // Use this for initialization void Awake() { agent = GetComponent <UnityEngine.AI.NavMeshAgent>(); //agent.updateRotation = false; agent.speed = speed; //将导航速度和自己定义速度保持一致 ani = GetComponent <Animator>(); HUDRoot = FindObjectOfType <bl_HUDText>(); hitFxPrefab = Resources.Load <GameObject>("HitFx/HitFx1"); IsFly = false;//不起飞 textAinPrefab = Resources.Load <GameObject>("HitFx/TextAni"); }
private void Start() { move = GetComponent <PlayerMove>(); anim = GetComponent <Animation>(); pi = GetComponent <PlayerInfo>(); HUDRoot = GameObject.FindGameObjectWithTag(Tags.HUD.ToString()).GetComponent <bl_HUDText>(); oriColor = mate.GetComponent <Renderer>().material.color; foreach (var item in efxArray) { efxDic.Add(item.name, item); } }
// Start is called before the first frame update void Start() { HUDRoot = bl_UHTUtils.GetHUDText; HUDTextInfo info2 = new HUDTextInfo(transform, "- " + Random.Range(50, 100)); info2.Color = Color.white; info2.Size = 20; info2.Speed = 0; info2.VerticalAceleration = -3; info2.VerticalFactorScale = 1; info2.VerticalFactorScale = Random.Range(1.2f, 3); info2.VerticalPositionOffset = 3; HUDRoot.NewText(info2); }
public GameObject AinPrefab;//掉血预设物 // Use this for initialization void Awake() { agent = GetComponent <UnityEngine.AI.NavMeshAgent>(); //获取导航组件 agent.speed = speed; //将导航速度和自己定义速度保持一致 ani = GetComponent <Animator>(); //获取动画组件 HUDRoot = FindObjectOfType <bl_HUDText>(); //获取特效 hitFxPrefab = Resources.Load <GameObject>("HitFx/HitFx1"); deadFxPrefab = Resources.Load <GameObject>("HitFx/DeadFx1"); //初始化 uiPanelJoystick = FindObjectOfType <UIPanelJoystick>(); AinPrefab = Resources.Load <GameObject>("HitFx/TextAni"); }
private void Start() { player = this.GetComponent <Player>(); if (GameController.Instance.battleType == BattleType.Team && player.roleId == PhotonEngine.Instance.role.Id) //当前角色是团队战斗,且属于当前客户端 { battleController = GameController.Instance.GetComponent <BattleController>(); isSyncPlayerAnimation = true; } hp = PlayerInfo.Intance.HP; PlayerEffect[] peArray = this.GetComponentsInChildren <PlayerEffect>(); foreach (PlayerEffect pe in peArray) { effectDict.Add(pe.gameObject.name, pe); } hudTextGo = HpBarManager._instance.GetHudText(hpbarPoint.gameObject); hudText = hudTextGo.GetComponent <bl_HUDText>(); }
void Start() { GameObject go = GameObject.Find("Bag"); if (go != null) { _bagMgr = go.GetComponent <BagManager>(); } go = GameObject.Find("PowerBar"); if (go != null) { _powerBar = go.GetComponent <PowerBar>(); } go = GameObject.Find("HUDText"); if (go != null) { _hudText = go.GetComponent <bl_HUDText>(); } EventDispatcher.Instance.AddListener(Events.GameEvent.ThrowFoodFinish, _OnThrowFoodFinish); }
void Awake() { HUDRoot = bl_UHTUtils.GetHUDText; }
public void OnEnable() { m_Component = (bl_HUDText)target; }
void Awake() { mInstance = this; }
public void Initialize(bl_HUDText _root) { HUDRoot = _root; GameEntry.Event.Subscribe(SkillEffectEvent.EventId, OnShowHUDText); }
void Start() { HUDRoot = bl_UHTUtils.GetHUDText; }
public void Release() { GameEntry.Event.Unsubscribe(SkillEffectEvent.EventId, OnShowHUDText); HUDRoot = null; }