コード例 #1
0
ファイル: War.cs プロジェクト: PenpenLi/abcabcabc.mg
        public void Destory()
        {
            War.service.Clear();
            _skillWarManager    = null;
            _sceneCreate        = null;
            _exe                = null;
            _pvp                = null;
            _pveExpedition      = null;
            _manager            = null;
            _scene              = null;
            _map                = null;
            _preload            = null;
            _factory            = null;
            _skillOperateSelect = null;
            _skillUse           = null;
            _skillCreater       = null;
            _starManager        = null;
            _starPVPManager     = null;
            _winManager         = null;
            _pathManager        = null;
            _msgBox             = null;
            _msgBox             = null;
            _textEffect         = null;
            _hunManager         = null;
            _legionExpEffect    = null;
            _legionLevelManager = null;
            _soliderPool.Clear();

            _materials = null;
            _icons     = null;



            War.signal.Destory();
        }
コード例 #2
0
    /// <summary>
    /// Adding new message box with raw data that comes from a fresh new ink file
    /// </summary>
    /// <param name="msgType"></param>
    /// <param name="text"></param>
    /// <param name="shootTime"></param>
    /// <param name="isAddedToTop"></param>
    private void _AddNewDemonMessageBox(MessageBubbleType msgType, string text, DateTime rawShootTime, out DateTime shootTime)
    {
        //processing label elements in the raw text and clean them to get the real text
        text      = TextEffectManager.ProcessingTags(text, out List <UndefinedTagInfo> undefinedTagInfos, out List <Tag> gameRelatedTags);
        shootTime = _AddTypingBehaviorBox(text, gameRelatedTags, rawShootTime);

        //Time Stamp appearing logic
        if ((shootTime - _lastTimeStamp) > TimeSpan.FromMinutes(10f))
        {
            MessageContent ts = new MessageContent();
            ts.messageType = MessageBubbleType.TimeStamp;
            ts.content     = String.Empty;
            ts.shootTime   = shootTime;
            _currentDialogueMessages.Add(ts);

            _AddMessageBox(ts);
            _lastTimeStamp = shootTime;
        }

        MessageContent msg = new MessageContent();

        msg.messageType = msgType;
        msg.content     = text;
        msg.shootTime   = shootTime;
        _currentDialogueMessages.Add(msg);

        _AddMessageBox(msg);

        //Prefab Logic
        foreach (var textFiles in gameRelatedTags.Where(tag => tag is TextFile).ToList())
        {
            var file = textFiles as TextFile;

            if ((shootTime - _lastTimeStamp) > TimeSpan.FromMinutes(10f))
            {
                MessageContent ts = new MessageContent();
                ts.messageType = MessageBubbleType.TimeStamp;
                ts.content     = String.Empty;
                ts.shootTime   = shootTime + TimeSpan.FromSeconds(1);
                _currentDialogueMessages.Add(ts);

                _AddMessageBox(ts);
                _lastTimeStamp = shootTime;
            }

            msg                 = new MessageContent();
            msg.messageType     = MessageBubbleType.Prefab;
            msg.content         = string.Empty;
            msg.fileBubbleName  = file.fileBubble;
            msg.fileContentName = file.fileContent;
            msg.shootTime       = shootTime + TimeSpan.FromSeconds(1);
            _currentDialogueMessages.Add(msg);

            _AddMessageBox(msg);
        }
    }
コード例 #3
0
 void Start()
 {
     Instance = this;
     Debug.Log(a);
     Debug.Log(ProcessingTags(a));
 }
コード例 #4
0
 void Awake()
 {
     //textPrefab = Resources.Load<GameObject>("InGameTextPrefab");
     instance = this;
 }
コード例 #5
0
    private void _AddNewMessageBox(MessageBubbleType msgType, string text, DateTime shootTime, bool isAddedToTop = false)
    {
        text = TextEffectManager.ProcessingTags(text, out List <UndefinedTagInfo> undefinedTagInfos, out List <Tag> gameRelatedTags);

        if ((shootTime - _lastTimeStamp) > TimeSpan.FromMinutes(10f))
        {
            _CreateNewTimeStamp(shootTime);
            _lastTimeStamp = shootTime;
        }

        switch (msgType)
        {
        case MessageBubbleType.Player:
            //create the msg info and put them in the save manager
            MessageContent msg = new MessageContent();
            msg.messageType = MessageBubbleType.Player;
            msg.content     = text;
            msg.shootTime   = shootTime;
            _currentDialogueMessages.Add(msg);

            //create the bubble
            Services.textSequenceTaskRunner.AddTask(delegate
            {
                GameObject newTimeBox = GameObject.Instantiate(Resources.Load <GameObject>(_playerTextBox), content.transform);
                newTimeBox.GetComponentInChildren <TextMeshProUGUI>().text = text;
            }, shootTime);
            break;

        case MessageBubbleType.Demon:
            msg             = new MessageContent();
            msg.messageType = MessageBubbleType.Demon;
            msg.content     = text;
            msg.shootTime   = shootTime;
            _currentDialogueMessages.Add(msg);

            Services.textSequenceTaskRunner.AddTask(delegate
            {
                GameObject newTimeBox = GameObject.Instantiate(Resources.Load <GameObject>(_demonTextBox), content.transform);
                newTimeBox.GetComponentInChildren <TextMeshProUGUI>().text = text;
            }, shootTime);
            break;

        case MessageBubbleType.Prefab:
            Debug.Log("Change to use AddNewFileMessage to initiate a prefab msg.");
            break;
        }

        foreach (var textFiles in gameRelatedTags.Where(tag => tag is TextFile).ToList())
        {
            var file = textFiles as TextFile;
            if ((shootTime - _lastTimeStamp) > TimeSpan.FromMinutes(10f))
            {
                _CreateNewTimeStamp(shootTime);
                _lastTimeStamp = shootTime;
            }

            var msg = new MessageContent();
            msg.messageType     = MessageBubbleType.Prefab;
            msg.fileBubbleName  = file.fileBubble;
            msg.fileContentName = file.fileContent;
            msg.shootTime       = shootTime;
            _currentDialogueMessages.Add(msg);

            var bubblePrefab = Resources.Load <GameObject>("Prefabs/FileBubble/" + file.fileBubble);

            Services.textSequenceTaskRunner.AddTask(delegate
            {
                var bubble = GameObject.Instantiate(bubblePrefab, content.transform);
                bubble.GetComponentInChildren <OpenFileButton>().fileContentName = file.fileContent;
            }, shootTime + TimeSpan.FromSeconds(1));
        }
    }