コード例 #1
0
ファイル: Monster.cs プロジェクト: luuthevinh/yugioh-new-gen
        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);
        }
コード例 #2
0
ファイル: Monster.cs プロジェクト: luuthevinh/yugioh-new-gen
        public Monster(ContentManager _content, string _cardId)
            : base(_content, ID.CARD, (SpriteID)(Enum.Parse(typeof(SpriteID), "C" + _cardId)), eCardType.MONSTER)
        {
            this.Original      = new MonsterCardData((MonsterCardData)CardProvider.GetInstance().GetCardById("C" + _cardId));
            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);
            this.num_slash.FrameWidth = 10;
        }
コード例 #3
0
 public Spell(ContentManager _content, SpriteID _spriteId)
     : base(_content, ID.CARD, _spriteId, eCardType.SPELL)
 {
     this.Original = new SpellCardData((SpellCardData)CardProvider.GetInstance().GetCardById(_spriteId.ToString()));
 }
コード例 #4
0
 public Spell(ContentManager _content, string _cardId)
     : base(_content, ID.CARD, (SpriteID)(Enum.Parse(typeof(SpriteID), "C" + _cardId)), eCardType.SPELL)
 {
     this.Original = new SpellCardData((SpellCardData)CardProvider.GetInstance().GetCardById("C" + _cardId));
 }
コード例 #5
0
ファイル: Trap.cs プロジェクト: luuthevinh/yugioh-new-gen
 public Trap(ContentManager _content, SpriteID _spriteId)
     : base(_content, ID.CARD, _spriteId, eCardType.TRAP)
 {
     this.Original = new TrapCardData((TrapCardData)CardProvider.GetInstance().GetCardById(_spriteId.ToString()));
 }