少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-20 a87120c155c48fa45b20a97c1a58bdbeb77318b7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using UnityEngine;
 
[CreateAssetMenu(menuName = "Config/WindowPosConfig")]
public class WindowPosCnfig : ScriptableObject
{
    //public Vector3 comparePos1 = new Vector3(400, 288, 0); 
    //public Vector3 comparePos2 = new Vector3(27, 288, 0); 
 
    public ItemTipsPos[] ItemTipsPoslist;
 
    static WindowPosCnfig config;
    public static WindowPosCnfig Get()
    {
        if (config == null)
        {
            config = BuiltInLoader.LoadScriptableObject<WindowPosCnfig>("WindowPosConfig");
        }
 
        return config;
    }
 
    public ItemTipsPos GetItemTipsPos(int code)
    {
        return ItemTipsPoslist[code];
    }
}
 
[Serializable]
public struct ItemTipsPos
{
    public Vector3 comparePos1;//当前弹框位置
    public Vector3 comparePos2;//默认比较弹框位置
}