예제 #1
0
        public Player()
        {
            m_location  = new LocationComponent(this);
            m_rigidBody = new RigidBodyComponent(this, m_location);

            m_renderer = new SpriteRenderer(PlayerSprites.Instance);
            m_sprite   = m_renderer.AddSprite(PlayerSprites.Instance.StandRight);

            m_walkRightSequence = new SpriteSequence(
                PlayerSprites.Instance.WalkRight01,
                PlayerSprites.Instance.WalkRight02,
                PlayerSprites.Instance.WalkRight03,
                PlayerSprites.Instance.WalkRight04,
                PlayerSprites.Instance.WalkRight05,
                PlayerSprites.Instance.WalkRight06,
                PlayerSprites.Instance.WalkRight07,
                PlayerSprites.Instance.WalkRight08,
                PlayerSprites.Instance.WalkRight09,
                PlayerSprites.Instance.WalkRight10,
                PlayerSprites.Instance.WalkRight11
                );

            m_walkLeftSequence = new SpriteSequence(
                PlayerSprites.Instance.WalkLeft01,
                PlayerSprites.Instance.WalkLeft02,
                PlayerSprites.Instance.WalkLeft03,
                PlayerSprites.Instance.WalkLeft04,
                PlayerSprites.Instance.WalkLeft05,
                PlayerSprites.Instance.WalkLeft06,
                PlayerSprites.Instance.WalkLeft07,
                PlayerSprites.Instance.WalkLeft08,
                PlayerSprites.Instance.WalkLeft09,
                PlayerSprites.Instance.WalkLeft10,
                PlayerSprites.Instance.WalkLeft11
                );

            m_standRightSequence = new SpriteSequence(PlayerSprites.Instance.StandRight);
            m_standLeftSequence  = new SpriteSequence(PlayerSprites.Instance.StandLeft);
            m_jumpRightSequence  = new SpriteSequence(PlayerSprites.Instance.JumpRight);
            m_jumpLeftSequence   = new SpriteSequence(PlayerSprites.Instance.JumpLeft);
            m_duckRightSequence  = new SpriteSequence(PlayerSprites.Instance.DuckRight);
            m_duckLeftSequence   = new SpriteSequence(PlayerSprites.Instance.DuckLeft);
        }
예제 #2
0
        public Player()
        {
            m_location = new LocationComponent(this);
            m_rigidBody = new RigidBodyComponent(this, m_location);

            m_renderer = new SpriteRenderer(PlayerSprites.Instance);
            m_sprite = m_renderer.AddSprite(PlayerSprites.Instance.StandRight);

            m_walkRightSequence = new SpriteSequence(
                PlayerSprites.Instance.WalkRight01,
                PlayerSprites.Instance.WalkRight02,
                PlayerSprites.Instance.WalkRight03,
                PlayerSprites.Instance.WalkRight04,
                PlayerSprites.Instance.WalkRight05,
                PlayerSprites.Instance.WalkRight06,
                PlayerSprites.Instance.WalkRight07,
                PlayerSprites.Instance.WalkRight08,
                PlayerSprites.Instance.WalkRight09,
                PlayerSprites.Instance.WalkRight10,
                PlayerSprites.Instance.WalkRight11
            );

            m_walkLeftSequence = new SpriteSequence(
                PlayerSprites.Instance.WalkLeft01,
                PlayerSprites.Instance.WalkLeft02,
                PlayerSprites.Instance.WalkLeft03,
                PlayerSprites.Instance.WalkLeft04,
                PlayerSprites.Instance.WalkLeft05,
                PlayerSprites.Instance.WalkLeft06,
                PlayerSprites.Instance.WalkLeft07,
                PlayerSprites.Instance.WalkLeft08,
                PlayerSprites.Instance.WalkLeft09,
                PlayerSprites.Instance.WalkLeft10,
                PlayerSprites.Instance.WalkLeft11
            );

            m_standRightSequence = new SpriteSequence(PlayerSprites.Instance.StandRight);
            m_standLeftSequence = new SpriteSequence(PlayerSprites.Instance.StandLeft);
            m_jumpRightSequence = new SpriteSequence(PlayerSprites.Instance.JumpRight);
            m_jumpLeftSequence = new SpriteSequence(PlayerSprites.Instance.JumpLeft);
            m_duckRightSequence = new SpriteSequence(PlayerSprites.Instance.DuckRight);
            m_duckLeftSequence = new SpriteSequence(PlayerSprites.Instance.DuckLeft);
        }