private void Update() { //回复 护盾值 attributes.SheildPoint += attributes.SPRegenerationRate.Value * Time.deltaTime; if (attributes.data.IsCaster) { //回复 魔法值 和 当前技能冷却(应当是全体技能冷却,同时技能初始精确度未设置) attributes.ManaPoint.Value += attributes.MPRegenerationRate.Value * Time.deltaTime; skillTable.CurrentSkill.AccuracyCooldown(Time.deltaTime); } //触发buff效果 BuffEvent?.Invoke(); if (GameCtrl.IsOnlineGame && IsLocal) { if (Gamef.SystemTimeInMillisecond - lastSyncUnitStateInstant >= GameDB.SYNC_TRANSFORM_INTERVAL) { Debug.Log("Send Hp = " + attributes.SheildPoint + ", Mp = " + attributes.ManaPoint.Value); lastSyncUnitStateInstant = Gamef.SystemTimeInMillisecond; DataSync.SyncHP(this, lastSyncUnitStateInstant, attributes.SheildPoint); DataSync.SyncMP(this, lastSyncUnitStateInstant, attributes.ManaPoint.Value); } } ////单位画布面对摄像机 //if (unitCanvas != null) // unitCanvas.transform.forward = unitCamera.position - unitCanvas.transform.position; }