少年修仙传客户端代码仓库
lcy
3 天以前 6d8908e1fcfb62e174d1fa60eb6aa31f65dff3e1
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
35
36
37
38
39
40
41
42
43
44
45
46
47
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
 
public class WaitingForSecondConst
{
    public static readonly WaitForSeconds WaitMS100 = new WaitForSeconds(0.1f);
    public static readonly WaitForSeconds WaitMS200 = new WaitForSeconds(0.2f);
    public static readonly WaitForSeconds WaitMS300 = new WaitForSeconds(0.3f);
    public static readonly WaitForSeconds WaitMS400 = new WaitForSeconds(0.4f);
    public static readonly WaitForSeconds WaitMS500 = new WaitForSeconds(0.5f);
    public static readonly WaitForSeconds WaitMS600 = new WaitForSeconds(0.6f);
    public static readonly WaitForSeconds WaitMS700 = new WaitForSeconds(0.7f);
    public static readonly WaitForSeconds WaitMS800 = new WaitForSeconds(0.8f);
    public static readonly WaitForSeconds WaitMS900 = new WaitForSeconds(0.9f);
    public static readonly WaitForSeconds WaitMS1000 = new WaitForSeconds(1f);
 
    public static readonly WaitForSeconds WaitMS1100 = new WaitForSeconds(1.1f);
    public static readonly WaitForSeconds WaitMS1200 = new WaitForSeconds(1.2f);
    public static readonly WaitForSeconds WaitMS1300 = new WaitForSeconds(1.3f);
    public static readonly WaitForSeconds WaitMS1400 = new WaitForSeconds(1.4f);
    public static readonly WaitForSeconds WaitMS1500 = new WaitForSeconds(1.5f);
    public static readonly WaitForSeconds WaitMS1600 = new WaitForSeconds(1.6f);
    public static readonly WaitForSeconds WaitMS1700 = new WaitForSeconds(1.7f);
    public static readonly WaitForSeconds WaitMS1800 = new WaitForSeconds(1.8f);
    public static readonly WaitForSeconds WaitMS1900 = new WaitForSeconds(1.9f);
    public static readonly WaitForSeconds WaitMS2000 = new WaitForSeconds(2f);
    public static readonly WaitForSeconds WaitMS3000 = new WaitForSeconds(3f);
    public static readonly WaitForSeconds WaitMS10000 = new WaitForSeconds(10f);
    public static readonly WaitForSeconds WaitMS60000 = new WaitForSeconds(60f);
 
    private static Dictionary<float, WaitForSeconds> m_WaitDict = new Dictionary<float, WaitForSeconds>();
    public static WaitForSeconds GetWaitForSeconds(float _t)
    {
        if (m_WaitDict.ContainsKey(_t))
        {
            return m_WaitDict[_t];
        }
        else
        {
            var _wait = new WaitForSeconds(_t);
            m_WaitDict.Add(_t, _wait);
            return _wait;
        }
    }
 
}