コード例 #1
0
        public Character(CharacterSprite characterSprite)
        {
            Id = Guid.NewGuid();
            CharSprite = characterSprite;

            if (CharSprite != null && CharSprite.SpriteSet != null)
            {
                SpriteSetName = CharSprite.SpriteSet.Name;
            }

            StartupVariables();
        }
コード例 #2
0
        public void CreatePlayers()
        {
            Characters = new Dictionary<CharacterClass, Character.Character>();

            var spriteSet = SpriteCollection.FirstOrDefault(s => s.Name.ToLower() == "human");
            var sprite = new CharacterSprite(spriteSet);
            var shinobi = new Character.Character(sprite)
            {
                Equipment =
                {
                    MainWeapon = (Weapon) Item.Find("Battle Knife")
                }
            };

            shinobi.Name = "Shinobi";
            shinobi.SetClass(Classes[CharacterClass.Shinobi]);
            shinobi.Stats.Speed = 1.6f;
            Characters.Add(CharacterClass.Shinobi, shinobi);

            Player = Characters[CharacterClass.Shinobi];
        }