Esempio n. 1
0
    public GameSimulation(GameSettings setSttings, ConstData conConstantData)
    {
        m_setGameSettings     = setSttings;
        m_conConstantGameData = conConstantData;

        //calculate queue length
        int iQueueLength = (int)FixMath.Ceiling(m_setGameSettings.m_fixTargetQueueLength / m_setGameSettings.m_fixTickDelta);

        //fill queue
        m_frmDenseFrameQueue = new List <FrameData>(iQueueLength);

        for (int i = 0; i < iQueueLength; i++)
        {
            m_frmDenseFrameQueue.Add(new FrameData(m_conConstantGameData.PlayerCount));
        }

        m_bInputsForTick  = new List <byte>(m_conConstantGameData.PlayerCount);
        m_ipbPlayerInputs = new List <InputBuffer>(m_conConstantGameData.PlayerCount);

        for (int i = 0; i < m_conConstantGameData.PlayerCount; i++)
        {
            m_bInputsForTick.Add(0);
            m_ipbPlayerInputs.Add(new InputBuffer(iQueueLength));
        }
    }
Esempio n. 2
0
 public static DynValue ceil(ScriptExecutionContext executionContext, CallbackArguments args)
 {
     return(exec1(args, "ceil", (x) => FixMath.Ceiling(x)));
 }