コード例 #1
0
        public ExpPool(HeroSyncData sync)
        {
            this.sync = sync;

            needExp    = new int[maxLevel - 1];
            needExp[0] = 100;
            for (int i = 1; i < needExp.Length; i++)
            {
                needExp[i] = needExp[0] + (int)(needExp[0] * 0.1f) * i;
            }

            curExp = 0;
        }
コード例 #2
0
        public Hero(byte faction, byte heroID, ushort hp, ushort mp, float xPos, float zPos, float yRot, float wRot)
        {
            ushort objID = ObjIDGenerator.GenerateID(ObjIDGenerator.ObjType.Hero);

            //debug
            if (objID % 2 == 0)
            {
                faction = 0;
                xPos    = -48.0f;
                zPos    = -48.0f;
            }
            else
            {
                faction = 1;
                xPos    = 48.0f;
                zPos    = 48.0f;
            }

            init = new HeroInitialData(faction, heroID);
            sync = new HeroSyncData(objID, hp, mp, xPos, zPos, yRot, wRot, 0, 1, 0, new Items(), new BuffDebuff(0), new EnemyVision(false));
            pool = new ExpPool((HeroSyncData)sync);

            radius = 0.3f;
        }