package fight import ( "go_dreamfactory/modules/battle/fight/core" "sort" ) type FightRoleSlice []core.IFightRole func (x FightRoleSlice) Len() int { return len(x) } func (x FightRoleSlice) Less(i, j int) bool { return x[i].GetData().Operate.Value() < x[j].GetData().Operate.Value() } func (x FightRoleSlice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } func (x FightRoleSlice) Sort(pType string) { sort.Sort(x) }