Example #1
0
 void Start()
 {
     roles = CreatePlayerRole.GetRoles();
     ShowPlayerInfo(CreatePlayerRole.roleId);
     UIManager.SetButtonEventHandler(EnButton.gameObject, EnumButtonEvent.OnClick, OnClickDEnButton, 0, 0);
     UIManager.SetButtonEventHandler(CanButton.gameObject, EnumButtonEvent.OnClick, OnClickCanButton, 0, 0);
 }
Example #2
0
    void Start()
    {
        roles = CreatePlayerRole.GetRoles();

        UIManager.SetButtonEventHandler(DeletePlayer.gameObject, EnumButtonEvent.OnClick, OnClickDeletePlayer, 0, 0);
        UIManager.SetButtonEventHandler(startBtn.gameObject, EnumButtonEvent.OnClick, OnClickstart, 0, 0);
        nameLabel.text  = nameStr;
        levelLabel.text = LevelStr;
    }
Example #3
0
    void InitAlreadyHadPlayer()
    {
        roles = CreatePlayerRole.GetRoles();

        maxCount = roles.Count;
        for (int i = 0; i < roles.Count; i++)
        {
            COM_SimpleInformation role = roles[i];
            rolesId.Add(role.instId_);
            CreatePlayerObj(role);
        }
        posIndex += roles.Count;
        if (posIndex < cRole.playerPos.Length)
        {
            SetCreateBtnPos();
        }
    }
Example #4
0
 void AssetLoadCallBack(GameObject ro, ParamData data)
 {
     ro.name = data.iParam.ToString();
     rolesobj.Add(ro);
     curCount++;
     if (curCount == maxCount)
     {
         for (int i = 0; i < CreatePlayerRole.GetRoles().Count; i++)
         {
             for (int j = 0; j < rolesobj.Count; j++)
             {
                 if (CreatePlayerRole.GetRoles()[i].instId_ == int.Parse(rolesobj[j].name))
                 {
                     gos.Add(rolesobj[j]);
                 }
             }
         }
         SetPlayerPos();
     }
 }