예제 #1
0
        public List <BusinessPartner> GetAll(eCardType pCardType)
        {
            var myQuery = new TableQuery(this);

            myQuery.Where.Add(new QueryParam(m_CardType, pCardType.ToStringEnum()));
            return(FillCollection <BusinessPartner>(myQuery));
        }
예제 #2
0
 public MusicCard()
 {
     m_SongName    = "";
     m_SongPath    = "";
     m_SoundPlayer = null;
     m_Type        = eCardType.UNDEFINED;
 }
예제 #3
0
 public CardData(string _id, string _name, string _description, string _cardType)
 {
     Id          = _id;
     CardType    = (eCardType)Enum.Parse(typeof(eCardType), _cardType);
     Name        = _name;
     Description = _description;
 }
예제 #4
0
 public CardData(string _id, string _name, string _description, eCardType _cardType)
 {
     Id          = _id;
     CardType    = _cardType;
     Name        = _name;
     Description = _description;
 }
예제 #5
0
 //public CardData()
 //{
 //    m_Name = String.Empty;
 //    m_Description = String.Empty;
 //}
 public CardData(CardData _cardData)
 {
     this.Id          = _cardData.Id;
     this.CardType    = _cardData.CardType;
     this.Name        = _cardData.Name;
     this.Description = _cardData.Description;
 }
예제 #6
0
 public CardData(string _id, string _name, string _description, eCardType _cardType)
 {
     Id = _id;
     CardType = _cardType;
     Name = _name;
     Description = _description;
 }
예제 #7
0
    // 메소드
    public void FormationCardsGrid(eGameCardSize eState,eBelong user,eCardType type)
    {
        int num = CardFindsNumCom();

        if (num > 1)
        {
        }
    }
예제 #8
0
    void Start()
    {
        SetCardInfo(null);
        //collider를 통해서 얻어와야 얻어짐...ㅠ.ㅠ
        var other = gameObject.GetComponent <Collider2D>().tag;

        if (other == "Player")
        {
            eBelongState = eBelong.PLAYER;
            eType        = eCardType.CENTERSLOT;
        }
    }
예제 #9
0
    public void InitCard(Sprite cardImg, eCardType type, int index, int rotateInfo)
    {
        _cardType = type;

        _cardImg.sprite = cardImg;
        _myIndex        = index;

        _myTr.localEulerAngles = new Vector3(_myTr.localEulerAngles.x, _myTr.localEulerAngles.y, 90 * rotateInfo);

        _initZ = _myTr.localEulerAngles.z;

        _myRotateCount = 0;
    }
예제 #10
0
    public List <CardInfo> GetTypeCards(eCardType type)
    {
        List <CardInfo> ret = new List <CardInfo>();

        for (int i = 0; i < cards.Count; i++)
        {
            if (cards[i].ca.CardType == type)
            {
                ret.Add(cards[i]);
            }
        }
        return(ret);
    }
예제 #11
0
 public static string GetName(this eCardType CardType)
 {
     switch (CardType)
     {
         case eCardType.Customer:
             return "Cliente";
         case eCardType.Vendor:
             return "Fornecedor";
         case eCardType.Lead:
             return "Lead";
         default:
             return string.Empty;
     }
 }
예제 #12
0
 public static string ToStringEnum(this eCardType CardType)
 {
     switch (CardType)
     {
         case eCardType.Customer:
             return strCustomer;
         case eCardType.Vendor:
             return strVendor;
         case eCardType.Lead:
             return strLead;
         default:
             return string.Empty;
     }
 }
예제 #13
0
        public Card(ContentManager _content, ID _id, SpriteID _spriteId, eCardType _cardType)
            : base(_content, _id, _spriteId)
        {
            m_yellow_circle        = new Sprite(SpriteManager.getInstance(_content).GetSprite(SpriteID.eff_y_circle));
            m_yellow_circle.Scale  = new Vector2(0.2f);
            m_yellow_circle.Origin = new Vector2(m_yellow_circle.Size.X / 2, m_yellow_circle.Size.Y / 2);

            m_backsideTexture  = SpriteManager.getInstance(_content).GetTexture(SpriteID.CBackSide);
            m_frontsideTexture = SpriteManager.getInstance(_content).GetTexture(_spriteId);
            //this.CanATK = true;
            this.IsFaceUp            = true;
            this.CardType            = _cardType;
            this.Button              = new Button(this.Sprite);
            this.Button.Position     = this.Position;
            this.Button.ButtonEvent += new Action(Button_DoActionClick);
            this.Button.RightClick  += new Action(Button_OnRightClick);
            this.Hovered            += new CardHoveredEventHandle(Card_Hovered);
        }
예제 #14
0
        public Card(ContentManager _content, ID _id, SpriteID _spriteId, eCardType _cardType)
            : base(_content, _id, _spriteId)
        {
            m_yellow_circle = new Sprite(SpriteManager.getInstance(_content).GetSprite(SpriteID.eff_y_circle));
            m_yellow_circle.Scale = new Vector2(0.2f);
            m_yellow_circle.Origin = new Vector2(m_yellow_circle.Size.X / 2, m_yellow_circle.Size.Y / 2);

            m_backsideTexture = SpriteManager.getInstance(_content).GetTexture(SpriteID.CBackSide);
            m_frontsideTexture = SpriteManager.getInstance(_content).GetTexture(_spriteId);
            //this.CanATK = true;
            this.IsFaceUp = true;
            this.CardType = _cardType;
            this.Button = new Button(this.Sprite);
            this.Button.Position = this.Position;
            this.Button.ButtonEvent += new Action(Button_DoActionClick);
            this.Button.RightClick += new Action(Button_OnRightClick);
            this.Hovered += new CardHoveredEventHandle(Card_Hovered);
        }
예제 #15
0
        //cái tham số mặc nhiên để tạm
        public Monster(ContentManager _content, SpriteID _spriteId, eCardType _cardType = eCardType.MONSTER)
            : base(_content, ID.CARD, _spriteId, _cardType)
        {
            this.Original = new MonsterCardData((MonsterCardData)CardProvider.GetInstance().GetCardById(_spriteId.ToString()));
            this.IsEffect = Original.IsEffect;
            this.Attribute = Original.Attribute;
            this.MonsterType = Original.MonsterType;
            this.Level = Original.Level;
            this.Atk = Original.Atk;
            this.Def = Original.Def;
            this.Rank = Original.Rank;
            this.PendulumScale = Original.PendulumScale;
            this.SpellSpeed = Original.SpellSpeed;
            this.CanATK = true;

            this.num_atk = new Num(_content, Vector2.Zero, SpriteID.font_710_whitenum);
            this.num_def = new Num(_content, Vector2.Zero, SpriteID.font_710_whitenum);
            this.num_slash = new Num(_content, Vector2.Zero, SpriteID.font_710_whitenum);
        }
예제 #16
0
        public Monster(ContentManager _content, SpriteID _spriteId, eCardType _cardType = eCardType.MONSTER)//cái tham số mặc nhiên để tạm
            : base(_content, ID.CARD, _spriteId, _cardType)
        {
            this.Original      = new MonsterCardData((MonsterCardData)CardProvider.GetInstance().GetCardById(_spriteId.ToString()));
            this.IsEffect      = Original.IsEffect;
            this.Attribute     = Original.Attribute;
            this.MonsterType   = Original.MonsterType;
            this.Level         = Original.Level;
            this.Atk           = Original.Atk;
            this.Def           = Original.Def;
            this.Rank          = Original.Rank;
            this.PendulumScale = Original.PendulumScale;
            this.SpellSpeed    = Original.SpellSpeed;
            this.CanATK        = true;

            this.num_atk   = new Num(_content, Vector2.Zero, SpriteID.font_710_whitenum);
            this.num_def   = new Num(_content, Vector2.Zero, SpriteID.font_710_whitenum);
            this.num_slash = new Num(_content, Vector2.Zero, SpriteID.font_710_whitenum);
        }
예제 #17
0
        public bool Deserialize(JSON_ConceptCardParam json, MasterParam master = null)
        {
            this.iname             = json.iname;
            this.name              = json.name;
            this.expr              = json.expr;
            this.type              = (eCardType)json.type;
            this.icon              = json.icon;
            this.rare              = json.rare;
            this.sell              = json.sell;
            this.en_cost           = json.en_cost;
            this.en_exp            = json.en_exp;
            this.en_trust          = json.en_trust;
            this.trust_reward      = json.trust_reward;
            this.first_get_unit    = json.first_get_unit;
            this.is_override_lvcap = true;
            this.lvcap             = json.lvcap;
            if (json.lvcap <= 0)
            {
                this.is_override_lvcap = false;
                RarityParam rarityParam = MonoSingleton <GameManager> .Instance.MasterParam.GetRarityParam(this.rare);

                if (rarityParam != null)
                {
                    this.lvcap = (int)rarityParam.ConceptCardLvCap;
                }
            }
            if (json.effects != null)
            {
                this.effects = new ConceptCardEffectsParam[json.effects.Length];
                for (int index = 0; index < json.effects.Length; ++index)
                {
                    ConceptCardEffectsParam cardEffectsParam = new ConceptCardEffectsParam();
                    if (!cardEffectsParam.Deserialize(json.effects[index]))
                    {
                        return(false);
                    }
                    this.effects[index] = cardEffectsParam;
                }
            }
            this.not_sale = json.not_sale == 1;
            return(true);
        }
예제 #18
0
    ////슬롯에 오브젝트 카드를 위치 시킨다.
    public void SetCardInfo(Card newInfo,eBelong man,eCardType type)
    {
        eBelongState = man;
        eType        = type;

        switch (type)
        {
        case eCardType.SLOT:

            if (newInfo != null)
            {
                cardInfo = newInfo;

                if (itemIcon == null)
                {
                    itemIcon = transform.Find("ItemCard").GetComponentInChildren <Image>();
                }

                string name = cardInfo.IconName;
                itemIcon.sprite  = SpriteManager.GetSpriteByName("Sprite",name);
                itemIcon.enabled = true;
                ID = cardInfo.ID;

                Sp         = newInfo.Spable;
                curLevelHp = newInfo.level;
                //null이 아닐때 gameobject null이면 false
                if (explainCard ?? false)
                {
                    if (ID >= 1)
                    {
                        string iconName = GameData.Instance.UnityDatas[ID - 1].Name;
                        string Spable   = GameData.Instance.UnityDatas[ID - 1].SpAble;        //특수 능력
                        int    AtK_zone = GameData.Instance.UnityDatas[ID - 1].Atk_Zone;      //성곽공격
                        int    Up_Hp    = GameData.Instance.UnityDatas[ID - 1].Up_Hp;
                        int    Up_atk   = GameData.Instance.UnityDatas[ID - 1].Up_atk;
                        txExplainCard.text = string.Format("\n\n{0}\n {1}\n 기지공격력:{2}\n 체력증가:{3}\n 공력증가:{4}\n",iconName,Spable,AtK_zone,Up_Hp,Up_atk);
                    }
                }


                if (cardBack != null)
                {
                    cardBack.enabled = true;
                }

                //ERROR ------->>>원인모름
                //"Atk_Zone" 적 공격력 "Up_Hp"성벽Hp증가량 Up_atk":공격증가량,
                //"SpAble":"non" 특수능력
            }
            else
            {
                cardInfo         = null;
                itemIcon.enabled = false;

                if (cardBack != null)
                {
                    cardBack.enabled = false;
                }
            }
            break;

        case eCardType.CENTERSLOT:

            if (newInfo != null)
            {
                cardInfo = newInfo;
                string name = cardInfo.IconName;
                if (itemIcon == null)
                {
                    itemIcon = transform.Find("ItemCard").GetComponentInChildren <Image>();
                }
                itemIcon.sprite  = SpriteManager.GetSpriteByName("Sprite",name);
                itemIcon.enabled = true;
                ID   = cardInfo.ID;
                Sp   = newInfo.Spable;
                plus = GameData.Instance.UnityDatas[ID - 1].Up_Hp;
                PlusHp();
                curLevelHp = newInfo.level;

                gameObject.transform.localScale = new Vector3(2,2,1);
            }
            else
            {
                cardInfo         = null;
                itemIcon.enabled = false;
                gameObject.transform.localScale = new Vector3(1,1,1);
                if (explainCard ?? false)
                {
                    string iconName = null;
                    string Spable   = null;
                    int    AtK_zone = 0;
                    int    Up_Hp    = 0;
                    int    Up_atk   = 0;
                    txExplainCard.text = string.Format("\n\n{0}\n {1}\n 기지공격력:{2}\n 체력증가:{3}\n 공력증가:{4}\n",iconName,Spable,AtK_zone,Up_Hp,Up_atk);
                }
            }
            break;
        }
    }
예제 #19
0
    ////슬롯에 오브젝트 카드를 위치 시킨다.
    public void SetCardInfo(Card newInfo,eCardType type)
    {
        //Debug.Log("--------SetCardInfo(Card newInfo, eCardType type)----------");
        switch (type)
        {
        case eCardType.SLOT:
            eType = type;
            if (newInfo != null)
            {
                cardInfo = newInfo;
                string name = cardInfo.IconName;
                if (itemIcon == null)
                {
                    itemIcon = transform.Find("ItemCard").GetComponentInChildren <Image>();
                }
                itemIcon.sprite  = SpriteManager.GetSpriteByName("Sprite",name);
                itemIcon.enabled = true;
                ID         = cardInfo.ID;
                Sp         = newInfo.Spable;
                curLevelHp = newInfo.level;
                Debug.Log("setCardInfo  ID : " + ID);

                //처음 생성될때는 적용되지 안고 있음
                if (cardBack != null)
                {
                    cardBack.enabled = true;
                }
            }
            else
            {
                cardInfo         = null;
                itemIcon.enabled = false;
                if (cardBack != null)
                {
                    cardBack.enabled = false;
                }
            }
            break;

        case eCardType.CENTERSLOT:
            eType = type;
            if (newInfo != null)
            {
                cardInfo = newInfo;
                string name = cardInfo.IconName;
                if (itemIcon == null)
                {
                    itemIcon = transform.Find("ItemCard").GetComponentInChildren <Image>();
                }
                itemIcon.sprite  = SpriteManager.GetSpriteByName("Sprite",name);
                itemIcon.enabled = true;
                ID = cardInfo.ID;
                Sp = newInfo.Spable;

                plus = GameData.Instance.UnityDatas[ID - 1].Up_Hp;
                PlusHp();
                curLevelHp = newInfo.level;
                gameObject.transform.localScale = new Vector3(2,2,1);

                //"Atk_Zone" 적 공격력 "Up_Hp"성벽Hp증가량 Up_atk":공격증가량,
                //"SpAble":"non" 특수능력
                if (explainCard ?? false)
                {
                    if (ID >= 1)
                    {
                        //Debug.Log(" GameCardSlot ----ID :" + ID);
                        string iconName = GameData.Instance.UnityDatas[ID - 1].Name;
                        string Spable   = GameData.Instance.UnityDatas[ID - 1].SpAble;        //특수 능력
                        int    AtK_zone = GameData.Instance.UnityDatas[ID - 1].Atk_Zone;      //성곽공격
                        int    Up_Hp    = GameData.Instance.UnityDatas[ID - 1].Up_Hp;
                        int    Up_atk   = GameData.Instance.UnityDatas[ID - 1].Up_atk;
                        txExplainCard.text = string.Format("\n\n{0}\n {1}\n 기지공격력:{2}\n 체력증가:{3}\n 공력증가:{4}\n",iconName,Spable,AtK_zone,Up_Hp,Up_atk);
                    }
                }
            }
            else
            {
                cardInfo         = null;
                itemIcon.enabled = false;
                gameObject.transform.localScale = new Vector3(1,1,1);
            }
            break;
        }
    }
예제 #20
0
    internal void Refresh()
    {
        DMUtils.BuildList <UILevelButton, DLevel>(OnBuildButton, Data.level.ToArray(), btnLevel.gameObject, btnLevel.transform.parent);

        btnLevels.onClick.RemoveAllListeners();
        btnLevels.onClick.AddListener(() =>
        {
            animations.Play("menu_slide_levels");
        });
        btnPlay.onClick.RemoveAllListeners();
        btnPlay.onClick.AddListener(() =>
        {
            StartLevel();
        });

        btnMoodA.onClick.RemoveAllListeners();
        btnMoodA.onClick.AddListener(() =>
        {
            currentCategory = eCardType.moodA;
            BuildDeck();
        });

        btnMoodB.onClick.RemoveAllListeners();
        btnMoodB.onClick.AddListener(() =>
        {
            currentCategory = eCardType.moodB;
            BuildDeck();
        });


        btnMoodC.onClick.RemoveAllListeners();
        btnMoodC.onClick.AddListener(() =>
        {
            currentCategory = eCardType.moodC;
            BuildDeck();
        });

        btnCombo.onClick.RemoveAllListeners();
        btnCombo.onClick.AddListener(() =>
        {
            currentCategory = eCardType.Combo;
            BuildDeck();
        });

        btnAction.onClick.RemoveAllListeners();
        btnAction.onClick.AddListener(() =>
        {
            currentCategory = eCardType.Action;
            BuildDeck();
        });

        btnAll.onClick.RemoveAllListeners();
        btnAll.onClick.AddListener(() =>
        {
            currentCategory = eCardType.All;
            BuildDeck();
        });



        animations.Play("menu_slide_levels");


        BuildDeck();
    }
예제 #21
0
    private void ShowCards(eCardType type)
    {
        List <CardInfo> infos = pCardMgr.GetTypeCards(type);

        UpdateCards(infos);
    }
예제 #22
0
    }//Method END

    //계산식 전체 크기를 벗어나지 않는 메소드
    public void FormationCardsArcCom(eGameCardSize eState,eBelong user,eCardType type)
    {   //카드의 숫자를 넘겨 받습니다.
        int num = CardFindsNumCom();

        if (num > 1)
        {
            //value 는 길이
            float curWidth = maxRimited - fade - width;
            //value 는 길이
            float widthEa = curWidth / num;
            //마지막 카드의 배치좌표
            float endPosition = 0.5f * (maxRimited - width - fade);
            //카드가 기울어질 최대각도
            float maxRot = -10;
            //Sin의  한번 반복량
            float rot = 180 / (num - 1);
            //기울기 량
            float angle = (maxRot * 2) / (num - 1);
            //아크의 곡선량*y값의 비율
            float amount = 70f;


            //할당 너비보다 카드가 크다면 겹쳐져야 한다.
            if (widthEa <= width)
            {
                //첫카드의 배치좌표  410 //전체 보정값이 필요함  (endPos - lastCard)/2
                float startPos    = -1 * (0.5f * (maxRimited - width - fade));
                float cha         = width - widthEa;
                float lastCardPos = startPos + ((num - 1) * widthEa);
                float startFull   = startPos + (endPosition - lastCardPos) / 2;

                //전체좌표를 적용해야 된다.
                //하나의 카드의 중심좌표로 배치하는가? 즉 Anchor을 파악해야된다.
                for (int i = 0; i < num; i++)
                {
                    float curAng = i * rot;
                    //반대편
                    if (curAng > 90)
                    {
                        curAng = 180 - (i * rot);
                    }

                    Vector3 moveTarget = new Vector3(startFull + (i * widthEa),amount * Mathf.Sin(curAng * Mathf.Deg2Rad) * -1,0);
                    //cardsLength[i].gameObject.transform.localPosition = new Vector3(startFull + (i * widthEa), amount * Mathf.Sin(curAng * Mathf.Deg2Rad) * -1, 0);


                    float      curAngle = maxRot - i * angle;     //-20 ~ 20
                    Quaternion rotation = Quaternion.Euler(0,0,curAngle);

                    cardsLength[i].gameObject.transform.localRotation = Quaternion.Euler(0,0,curAngle);
                    cardsLength[i].CardSetSize(eState);
                    cardsLength[i].eBelongState = eBelong.COM;
                    cardsLength[i].eType        = eCardType.SLOT;

                    //TODO: 출발하는 위치 값을 여기서 설정해 주어야 한다.
                    iTween.MoveTo(cardsLength[i].gameObject,iTween.Hash("islocal",true,
                                                                        "position",moveTarget,
                                                                        "oncompletetarget",cardsLength[i].gameObject,
                                                                        "time",0.5f,
                                                                        "easetype","easeOutQuart")
                                  );
                }
            }
            else if (widthEa > width)
            {       //공간이 많이 남을때
                float startPos = 0 - 0.5f * (maxRimited);
                //카드 사이의 공간
                float aSpace = curWidth / (num + 1) - num * width / (num + 1);
                //공간이 남는다면 공간의 여백을 더 추가 해 줘야 한다.
                for (int i = 0; i < num; i++)
                {
                    //cardsLength[i].gameObject.transform.localPosition = new Vector3(startPos + aSpace + width + (i * (width + aSpace)), 0, 0);

                    Vector3 moveTarget = new  Vector3(startPos + aSpace + width + (i * (width + aSpace)),0,0);

                    iTween.MoveTo(cardsLength[i].gameObject,iTween.Hash("islocal",true,
                                                                        "position",moveTarget,
                                                                        "oncompletetarget",cardsLength[i].gameObject,
                                                                        "time",0.5f,
                                                                        "easetype","easeOutQuart")
                                  );
                }
            }
        } //IF END
    }