Ejemplo n.º 1
0
        public void OnLoadSucc(object source, UnityObject unityObj)
        {
            var player    = source as PlayerEntity;
            var fxCam     = player.cameraObj.EffectCamera;
            var assetInfo = unityObj.Address;

            if (assetInfo.Equals(AssetConfig.GetCameraPoisonEffect()))
            {
                var go = unityObj.AsGameObject;
                if (null != go)
                {
                    player.cameraFx.Poison       = go.GetComponentInChildren <ParticleSystem>().gameObject;
                    player.cameraFx.Poison.layer = UnityLayerManager.GetLayerIndex(EUnityLayerName.CameraFx);
                    go.transform.parent          = fxCam.transform;
                    go.transform.localPosition   = Vector3.zero;
                    go.transform.localRotation   = Quaternion.identity;
                    go.transform.localScale      = Vector3.one;
                }
            }
        }
Ejemplo n.º 2
0
 public override void SingleExecute(PlayerEntity entity)
 {
     AssetManager.LoadAssetAsync(entity, AssetConfig.GetCameraPoisonEffect(), OnLoadSucc);
 }