xLua icon indicating copy to clipboard operation
xLua copied to clipboard

如何重写父类的getter

Open pengjugame opened this issue 3 years ago • 0 comments

 public class Father
        {
            public virtual bool IsBestMan { get; set; } = true;
        }

        public class Son : Father
        {
            //如何让我现在的IsBestMan是false
        }

xlua

//不对
xlua.hotfix(CS.Son, "IsBestMan ", function() return true end) 
//不对
xlua.hotfix(CS.Son, "get_IsBestMan ", function() return true end) 

这里的xlua应该怎么写呢

pengjugame avatar Dec 23 '21 14:12 pengjugame