コード例 #1
0
        public void LoadBandit(Bandit bandit)
        {
            var banditTexture = _content.Load <Texture2D>("Bandit/bandit_attack");

            bandit.LoadAllFrames(
                CharacterAction.Fight,
                banditTexture,
                numberOfColumns: 7,
                numberOfRows: 1,
                dimensions: new Vector2(80, 80));

            banditTexture = _content.Load <Texture2D>("Bandit/bandit_attack");

            bandit.LoadAllFrames(
                CharacterAction.Die,
                banditTexture,
                numberOfColumns: 7,
                numberOfRows: 1,
                dimensions: new Vector2(80, 80));

            banditTexture = _content.Load <Texture2D>("Bandit/bandit_run");

            bandit.LoadAllFrames(
                CharacterAction.Walk,
                banditTexture,
                numberOfColumns: 8,
                numberOfRows: 1,
                dimensions: new Vector2(80, 80));
        }