少年修仙传客户端代码仓库
client_linchunjie
2019-05-08 070f2e2321268f4b8f9e8079571d055ab1c907c5
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
2个文件已添加
3个文件已修改
78 ■■■■■ 已修改文件
Fight/Stage/CreateRoleStage.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/DungeonStage.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CreateRolePostProcess/CreateRolePostProcessor.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CreateRolePostProcess/CreateRolePostProcessor.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/NearDeathWin.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/CreateRoleStage.cs
@@ -10,6 +10,11 @@
    {
        base.Initialize();
        if (CameraController.Instance != null)
        {
            CameraController.Instance.CameraObject.enabled = false;
        }
        if (VersionConfig.Get().isBanShu)
        {
            WindowCenter.Instance.Close<BanShuLoginWin>();
Fight/Stage/Dungeon/DungeonStage.cs
@@ -55,16 +55,17 @@
            CameraController.Instance.ResetOriginal();
        }
        if (PlayerDatas.Instance.baseData.LV == 1)
        if (PlayerDatas.Instance.baseData.LV == 1 && !CreateRolePostProcessor.HasPlayMovie((int)PlayerDatas.Instance.baseData.PlayerID))
        {
            CameraController.Instance.CameraObject.enabled = false;
            MoviePlayer.Instance.Play("CreateRoleMovie", () =>
            CreateRolePostProcessor.Begin(() =>
            {
                CreateRolePostProcessor.RecordPlayMovie((int)PlayerDatas.Instance.baseData.PlayerID);
                CameraController.Instance.CameraObject.enabled = true;
                WindowCenter.Instance.Open<MainInterfaceWin>(true);
                var taskModel = ModelCenter.Instance.GetModel<TaskModel>();
                taskModel.AutomaticTripToTask(taskModel.currentMission);
            });
            });
        }
        else
        {
@@ -78,6 +79,7 @@
        WindowCenter.Instance.Open<NewItemGetWin>();
        WindowCenter.Instance.Open<AttributePromoteShowWin>();
        WindowCenter.Instance.Open<StatusTipWin>();
        WindowCenter.Instance.Open<NearDeathWin>();
        CheckDungeonResult();
System/CreateRolePostProcess/CreateRolePostProcessor.cs
New file
@@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class CreateRolePostProcessor
{
    public static bool HasPlayMovie(int playerId)
    {
        return LocalSave.GetBool(StringUtility.Contact(playerId, "_CreateRolePostMovie"));
    }
    public static void RecordPlayMovie(int playerId)
    {
        LocalSave.SetBool(StringUtility.Contact(playerId, "_CreateRolePostMovie"), true);
    }
    static Action onEnd;
    public static void Begin(Action onComplete)
    {
        onEnd = onComplete;
        PlayMovie();
    }
    static void PlayMovie()
    {
        MoviePlayer.Instance.Play("CreateRoleMovie", PlayCameraAnimation);
    }
    static void PlayCameraAnimation()
    {
        if (onEnd != null)
        {
            onEnd();
        }
    }
}
System/CreateRolePostProcess/CreateRolePostProcessor.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 230ee9b29f8713a4e94e8340e754c0fa
timeCreated: 1557295652
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Tip/NearDeathWin.cs
@@ -48,7 +48,6 @@
    public class NearDeathWin : Window
    {
        [SerializeField] Image m_Effect;
        [SerializeField] AudioSource m_AudioSource;
@@ -71,6 +70,7 @@
        protected override void OnPreClose()
        {
            m_AudioSource.enabled = false;
        }
        protected override void OnAfterClose()
@@ -78,10 +78,22 @@
        }
        #endregion
        protected override void OnActived()
        {
            base.OnActived();
            UpdateSoundAndEffect();
        }
        protected override void LateUpdate()
        {
            base.LateUpdate();
            UpdateSoundAndEffect();
        }
        private void UpdateSoundAndEffect()
        {
            var percent = PlayerDatas.Instance.extersion.MaxHP <= 0 ? 1 : PlayerDatas.Instance.baseData.HP / (float)PlayerDatas.Instance.extersion.MaxHP;
            m_AudioSource.enabled = m_Effect.enabled = PlayerDatas.Instance.baseData.HP > 0 && percent <= GeneralDefine.lowHpRemind * 0.01f;
            m_AudioSource.volume = SystemSetting.Instance.GetSoundEffect();