Esempio n. 1
0
    void AsyncInitial()
    {
        fullObjects  = new List <GameObject>();
        emptyObjects = new List <GameObject>();

        for (int i = 0; i < maxSlot; i++)
        {
            emptyObjects.Add(BanTools.CreateNGUIOject(prefab_Empty, GetPos(i), Quaternion.identity, this.transform));
        }
    }
Esempio n. 2
0
 /// <summary>
 /// /生成一个属性克制效果
 /// </summary>
 /// <param name="attackAttribute">攻击方的属性.</param>
 /// <param name="defenseAttribute">防御方的属性.</param>
 public bool GenerateAttributeConflict(BanBattleRole.Attribute attackAttribute, BanBattleRole.Attribute defenseAttribute)
 {
             #if VS
     AttributeConflictEx temp = BanTools.CreateNGUIOject(BanBattleManager.Instance.prefab_AttributeConflict, go_AttributeConflictPos.transform.position,
                                                         Quaternion.identity, go_AttributeConflictPos.transform).GetComponent <AttributeConflictEx>();
     return(temp.Set(attackAttribute, defenseAttribute));
             #else
     BanAttributeConflict temp = BanTools.CreateNGUIOject(BanBattleManager.Instance.prefab_AttributeConflict, go_AttributeConflictPos.transform.position,
                                                          Quaternion.identity, go_AttributeConflictPos.transform).GetComponent <BanAttributeConflict>();
     return(temp.Set(attackAttribute, defenseAttribute));
             #endif
 }
Esempio n. 3
0
 //生成一个角色图标(位置,父节点)
 public BanBattleRoleIcon GenerateRoleIcon(Vector3 pos, Transform parent)
 {
     return(BanTools.CreateNGUIOject(BanBattleManager.Instance.prefab_RoleIcon, pos, Quaternion.identity, parent).GetComponent <BanBattleRoleIcon>());
 }