Exemple #1
0
    public UserData(string newId)
    {
        Id = newId;
        heroId = 1;
        heroLevel = 1;
        equipment = new int[equipNum];
        inventoryId = new int[invenNum];
        inventoryNum = new int[invenNum];
        skill = new int[skillNum];
        unit = new Unit[unitNum];
        attackUnit = new Unit[unitNum];
        createUnit = new Unit();
        building = new int[buildingNum];
        buildTime = new DateTime();
        buildBuilding = buildingNum;
        upgrade = new int[unitNum];
        resource = 1000;
        heroState = HeroState.Stationed;
        castleState = CastleState.Peace;

        for (int i = 0; i < unitNum; i++)
        {
            unit[i] = new Unit();
            attackUnit[i] = new Unit();
            upgrade[i] = 1;
        }
    }
Exemple #2
0
    void InitializeData()
    {
        heroDatabase = HeroDatabase.Instance;
        heroDatabase.InitializeHeroDatabase();
        itemDatabase = ItemDatabase.Instance;
        itemDatabase.InitializeItemDatabase();
        buildingDatabase = BuildingDatabase.Instance;
        buildingDatabase.InitializeBuildingDatabase();
        unitDatabase = UnitDatabase.Instance;
        unitDatabase.InitializeUnitDatabase();

        Id          = "";
        heroData    = new HeroBaseData();
        resource    = 0;
        heroState   = 0;
        castleState = 0;

        equipment    = new int[equipNum];
        inventoryId  = new int[invenNum];
        inventoryNum = new int[invenNum];
        skill        = new int[skillNum];
        unit         = new Unit[unitNum];
        createUnit   = new Unit();
        attackUnit   = new Unit[unitNum];
        building     = new int[buildingNum];
        upgrade      = new int[unitNum];

        buildBuilding = buildingNum;
    }
Exemple #3
0
 public void SetStateData(StateData stateData)
 {
     heroState   = (HeroState)stateData.heroData;
     castleState = (CastleState)stateData.castleData;
 }
Exemple #4
0
 //성 상태 변경
 public void ChangeCastleState(CastleState state)
 {
     castleState = state;
 }