Ejemplo n.º 1
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(this);
        }
        else
        {
            Destroy(gameObject);
            return;
        }
        LDConversionTable LDConversionTable = LDConversionTable.Load();

        m_DeathInputFrame = new LDInputFrame {
            action = LDConversionTable.GameplayTagToLDID(TypeTag.DeathAction), cell = 0
        };

        m_ServerTimeLine = new Server().RequestTimeLine();

        if (m_ServerTimeLine.timeLine == null || m_ServerTimeLine.timeLine.Length <= 0)
        {
            m_ServerTimeLine.timeLine = new LDBlock[0];
            m_BranchingIndex          = 0;
            m_CurrentBlock.mods       = new LDAttribute[0];

            m_CurrentBlock.branches                  = new int[0];
            m_CurrentBlock.characters                = new LDCharacter[3];
            m_CurrentBlock.characters[0].role        = (byte)CharacterRole.Assassin;
            m_CurrentBlock.characters[0].timeLine    = new LDInputFrame[1];
            m_CurrentBlock.characters[0].timeLine[0] = m_DeathInputFrame;
            m_CurrentBlock.characters[0].name        = "Ezio";
            m_CurrentBlock.characters[0].attributes  = new LDAttribute[0];

            m_CurrentBlock.characters[1].role        = (byte)CharacterRole.Barbarian;
            m_CurrentBlock.characters[1].timeLine    = new LDInputFrame[1];
            m_CurrentBlock.characters[1].timeLine[0] = m_DeathInputFrame;
            m_CurrentBlock.characters[1].name        = "Barb";
            m_CurrentBlock.characters[1].attributes  = new LDAttribute[0];

            m_CurrentBlock.characters[2].role        = (byte)CharacterRole.Necromancer;
            m_CurrentBlock.characters[2].timeLine    = new LDInputFrame[1];
            m_CurrentBlock.characters[2].timeLine[0] = m_DeathInputFrame;
            m_CurrentBlock.characters[2].name        = "Bob";
            m_CurrentBlock.characters[2].attributes  = new LDAttribute[0];
        }
        else
        {
            m_CurrentBlock = m_ServerTimeLine.timeLine[0];
        }
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     Conversion = LDConversionTable.Load();
 }