示例#1
0
        static CompExplosiveCE()
        {
            var dummyGO = new GameObject();

            UnityEngine.Object.DontDestroyOnLoad(dummyGO);
            _monoDummy = dummyGO.AddComponent <MonoDummy>();
        }
示例#2
0
    public Timer()
    {
        _cancelled = false;
        _rawTime   = 0;
        _name      = $"~Timer_{GetHashCode()}";

        var obj = new GameObject()
        {
            name      = _name,
            hideFlags = HideFlags.HideInHierarchy
        };

        _mono = obj.AddComponent <MonoDummy>();

        Application.quitting += () => _quitting = true;
    }