Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | if (AssetSource.sceneFromEditor) |
| | | { |
| | | #if UNITY_EDITOR |
| | | var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/", folder, "/", name, ".png"); |
| | | var path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, "Scene/", folder, "/", name, ".jpg"); |
| | | texture2D = UnityEditor.AssetDatabase.LoadAssetAtPath<Texture2D>(path); |
| | | #endif |
| | | } |
| | |
| | |
|
| | | SoundPlayer.Instance.UnLoadMusic(mapResConfig.Music);
|
| | | SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music);
|
| | |
|
| | | SceneResourcesReplace();
|
| | | // 做一些前期战斗的预加载
|
| | | // if (!PreFightMission.Instance.IsFinished())
|
| | | // {
|
| | |
| | |
|
| | | private void SceneResourceReplace10010()
|
| | | {
|
| | | var config = Config.Instance.Get<SceneReplaceConfig>(100101);
|
| | | if (config != null)
|
| | | for (var i = 100101; i <= 100109; i++)
|
| | | {
|
| | | var groundTexture = SceneLoader.LoadTexture(config.folder, config.resourceName);
|
| | | var @object = GameObject.Find(config.objectPath);
|
| | | var config = Config.Instance.Get<SceneReplaceConfig>(i);
|
| | | if (config != null)
|
| | | {
|
| | | var groundTexture = SceneLoader.LoadTexture(config.folder, config.resourceName);
|
| | | var @object = GameObject.Find(config.objectPath);
|
| | |
|
| | | var renderer = @object.GetComponent<Renderer>();
|
| | | renderer.material.SetTexture("_MainTex", groundTexture);
|
| | | var renderer = @object.GetComponent<Renderer>();
|
| | | renderer.material.SetTexture("_MainTex", groundTexture);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
|
| | | }
|
| | | if (ChatCtrl.Inst.presentChatType == ChatInfoType.CrossServer
|
| | | && !FuncOpen.Instance.IsFuncOpen(162))
|
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.World;
|
| | | }
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | AccountLogin(sdkLoginResult.account, _ip, _port, _gamePort);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl)
|
| | | {
|
| | | SDKUtility.Instance.FreePlatformLogin();
|
| | | }
|
| | | }
|
| | | else
{
if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yl
|| (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Yj
&& SDKUtility.Yj_AppID.Equals("hwgame")))
{
SDKUtility.Instance.FreePlatformLogin();
}
}
|
| | | }
|
| | |
|
| | | public void ReAccountLogin()
|
| | |
| | | using Snxxz.UI; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | public class RichShowPlayerEvent : TRichTextEvent |
| | | { |
| | | public RichShowPlayerEvent() |
| | | { |
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.SHOWPLAYER, this); |
| | | } |
| | | public override bool Execute(RichTextEventEnum type, RichTextMgr.HrefInfo href) |
| | | { |
| | | switch (type) |
| | | { |
| | | case RichTextEventEnum.SHOWPLAYER: |
| | | { |
| | | uint id = 0; |
| | | if (uint.TryParse(href.mSplits["showplayer"], out id)) |
| | | { |
| | | if (id == PlayerDatas.Instance.baseData.PlayerID) |
| | | { |
| | | return false; |
| | | } |
| | | PlayerDetails.ShowPlayerDetails((int)id, null); |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public override string GetDisplay(RichTextEventEnum type, Dictionary<string, string> dic) |
| | | { |
| | | return string.Empty; |
| | | } |
| | | } |
| | | using Snxxz.UI;
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | |
|
| | | public class RichShowPlayerEvent : TRichTextEvent
|
| | | {
|
| | | public RichShowPlayerEvent()
|
| | | {
|
| | | RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.SHOWPLAYER, this);
|
| | | }
|
| | | public override bool Execute(RichTextEventEnum type, RichTextMgr.HrefInfo href)
|
| | | {
|
| | | switch (type)
|
| | | {
|
| | | case RichTextEventEnum.SHOWPLAYER:
|
| | | {
|
| | | uint id = 0;
|
| | | if (uint.TryParse(href.mSplits["showplayer"], out id))
|
| | | {
|
| | | if (id == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var serverGroupId = 0;
|
| | | if (href.mSplits.ContainsKey("servergroupid"))
|
| | | {
|
| | | int.TryParse(href.mSplits["servergroupid"], out serverGroupId);
|
| | | }
|
| | | if (serverGroupId != 0 && serverGroupId != PlayerDatas.Instance.baseData.ServerGroupId)
|
| | | {
|
| | | var name = string.Empty;
|
| | | if (href.mSplits.ContainsKey("name"))
|
| | | {
|
| | | name = href.mSplits["name"];
|
| | | }
|
| | | var level = 0;
|
| | | if (href.mSplits.ContainsKey("level"))
|
| | | {
|
| | | int.TryParse(href.mSplits["level"], out level);
|
| | | }
|
| | | PlayerDetails.ShowCrossServerPlayer((int)id, level, name, serverGroupId);
|
| | | }
|
| | | else
|
| | | {
|
| | | PlayerDetails.ShowPlayerDetails((int)id, null);
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public override string GetDisplay(RichTextEventEnum type, Dictionary<string, string> dic)
|
| | | {
|
| | | return string.Empty;
|
| | | }
|
| | | }
|
| | |
| | | } |
| | | } |
| | | |
| | | public static void ShowCrossServerPlayer(int playerId, int level, string name, int serverGroupId)
|
| | | {
|
| | | openType = OpenType.CrossPlayer;
|
| | | PlayerID = playerId; |
| | | LV = level; |
| | | Job = 1; |
| | | RealmLV = 0; |
| | | PlayerName = name; |
| | | OnlineType = 0; |
| | | IsInTeam = 0; |
| | | ServerGroupId = serverGroupId; |
| | | |
| | | if (!WindowCenter.Instance.IsOpen<PlayerDetailWin>()) |
| | | { |
| | | WindowCenter.Instance.Open<PlayerDetailWin>(); |
| | | }
|
| | | } |
| | | |
| | | public static void ShowAreaPlayer(int _playerId)
|
| | | {
|
| | | openType = OpenType.Default; |